Heybo Blog

If you look at me when I'm talking, you'll see what I'm saying ... about Tech and .NET discoveries!

My Links

News

Story Categories

Archives

Post Categories

Image Galleries

Login

Blog Stats

Links

Personal Websites

Passing QueryStrings in the Address Bar / URL

Accessing parameters using the URL

I have included this as a post, but to make it easier to find, am adding it also as an article.

Sometimes, it is more convenient to have an ‘API’ interface to page templates that are database driven. Instead of hardcoding several pages, you would like to pass parameters to the page, to build the output. Below is an example of how to do it.

 

 

Ex. http://heybo.com/webapp/DisplayItem.aspx?ID=4&NameID=6

 

In code you would:

int ID = Int32.Parse(Request.QueryString[“ID”]);

int NameID = Int32.Parse(Request.QueryString[“NameID”]);

?>

posted on Friday, April 16, 2004 7:25 AM

Feedback

No comments posted yet
Title  
Name  
Url
Comments   
Protected by Clearscreen.SharpHIPEnter the code you see: