g Text Version
Beauty & Self
Books & Music
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
News & Politics
Religion & Spirituality
Travel & Culture
TV & Movies

Bored? Games!
Take a Quiz
Rate My Photo

Natural Living
Folklore and Mythology
Distance Learning

All times in EST

Full Schedule
g ASP Site

BellaOnline's ASP Editor


Creating WebSite Specific Postcards

Postcards, e-cards, and e-messages are extremely popular on the web. Here is how you can code your own site-specific postcards for your website, using ASP.

First, visit the BellaOnline Postcards area to get a sense how our postcards here work. They are fully code in ASP.

At the most basic level, postcard code is a form. You input your own email address, the destination email address, and a message. You also choose an image. All of those things are done with a basic HTML form, no ASP is necessary.

On the processing page, the ASP script takes each of those values into a variable. You use standard ASP commands (found on this site) to first get the maximum postcard ID from a counter table in your database, and to increment it by 1. You write that new number back to the database. Now you are able to construct the postcard's file name, let's say it is


Now comes what might be deemed the "tricky" part. You need to write out a HTML file called postcard999.html on your webserver for the end user to view. This HTML fiel will "look" like a postcard page, and will be what you tell the recipient to view. It needs to be a fully valid HTML document.

So you open a file, named postcard999.html, with standard ASP file open commands. You then start to write to this file lines such as

<TITLE>Site Postcard<\title>

Here is where you write the layout for your postcard page. It really helps if initially you write the very barest of bones - an IMG SRC to show the picture, and then a TO: with the to email, and a FROM with the from email. Start very simple. Once you get that working, you can start to make it more fancy.

Once you close out the file, it is time to send the email message. Use standard ASP commands to send a message "to" the to address, and "from" the from address. The body of the message would say that a postcard has been created, and the full URL of that postcard999.html should be provided.

Once that is done, redirect the user to a thank you page, thanking them for creating a postcard in your system.

That's it! Experiment at first with a single postcard image. Make sure that you can get the to, from and message from the user, and construct the postcard file and send the message. Once you get those basics down, it should be easy to expand the system so the postcards are more pretty, and so that you have more options to work with, including stamps, songs, borders, and more.
Add Creating+WebSite+Specific+Postcards to Twitter Add Creating+WebSite+Specific+Postcards to Facebook Add Creating+WebSite+Specific+Postcards to MySpace Add Creating+WebSite+Specific+Postcards to Digg Creating+WebSite+Specific+Postcards Add Creating+WebSite+Specific+Postcards to Yahoo My Web Add Creating+WebSite+Specific+Postcards to Google Bookmarks Add Creating+WebSite+Specific+Postcards to Stumbleupon Add Creating+WebSite+Specific+Postcards to Reddit

RSS | Related Articles | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map

For FREE email updates, subscribe to the ASP Newsletter

Past Issues

Printer Friendly
tell friend
Tell a Friend
Email Editor

Content copyright © 2018 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact Lisa Shea for details.


g features
Regular Expression Pattern Matching

Split ASP String Function

Saving Changes is Not Permitted error

Archives | Site Map


Past Issues

Note: BellaOnline uses cookies to help provide a consistent user experience. Our advertisers may use cookies to help customize ads. Please contact us with any question about our cookie use.

Summertime Foods
Corn on the Cob
Burgers on the Grill
Apple Pie


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2018 Minerva WebWorks LLC. All rights reserved.

BellaOnline Editor