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”]);
?>