• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Lesson 5. Passing Data Between Pages > Sending Data with Hyperlinks

Sending Data with Hyperlinks

The querystring's open display of data, though a problem for confidential information, has certain benefits. One of them is that you can embed data in hyperlinks. That is, you can collect information from users without requiring them to fill out a form. In this task, you will build a simple page, which, though a bit silly superficially, exhibits a couple of key dynamic Web site concepts in action.

You will build a two-page mini-application that lets each user specify whether she or he is a cat person or a dog person. The first page contains two links—one for cats and one for dogs. The interesting thing about these links is that they both point to the same page. The links are differentiated in that each has a querystring appended to it with the chosen animal preference. On the second page, dynamic text is output, based on the selected link. If you first choose one animal, and then go back and choose the other, it will appear as if you went to two different pages, while in fact you went to only one, with different dynamic text values displaying.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint