O'Reilly logo

Special Edition Using® Microsoft® ASP.NET by Richard Leinecker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

QueryString

You often need to pass parameters from one page to another. You may offer users a list of hyperlink choices. The hyperlinks might all go to the same page. To give the destination page enough information so that it can determine the correct action for each request, parameters may be submitted.

For ASP.NET applications, parameters are appended to the destination document’s URL. Immediately after the URL, a ? character is added to indicate that there are indeed parameters. Then for each parameter, there is a name and a value, such as "Flavor=Chocolate". Each parameter must be separated by a & character.

Using Parameters

The following hyperlink goes to Process.aspx, and has two parameters: Name and Address:

 <a href=”Process.aspx?Name=Sam&Address=123%20Main%20Street”>Sam</a> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required