View Single Post
  #2 (permalink)  
Old February 14th, 2007, 05:21 PM
philip_cole philip_cole is offline
Friend of Wrox
Points: 894, Level: 11
Points: 894, Level: 11 Points: 894, Level: 11 Points: 894, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2005
Location: London, , United Kingdom.
Posts: 166
Thanks: 2
Thanked 33 Times in 33 Posts
Default

Hi

To be honest I'm not sure if works with asp.net, but in C# the VBS bit should look like this:
Code:
string incfile = null;
string pg = Request.QueryString["page"];

switch(pg)
{
  case "main":
    incfile = "main.asp";
    break;
  case "add":
    incfile = "add.asp";
    break;
  case "edit":
    incfile = "edit.asp";
    break;
  default:
    // do something if none of the above?
    break;
}
The <%= incfile %> is the same.

Hope this helps
Phil
Reply With Quote