Hi,
I've written a page which takes a number of variables as querystrings, eg:
mypage.aspx?id=123&action=show
What I'd like to do, instead of using the string above, is use a sort of file structure look (ie separate variables by a '/') such as:
mypage.aspx/123/show
Or even better:
mypage/123/show
I know this is possible, because I have seen it done. I've done some research into it and it looks like it has something to do with HttpContext.Current.RewritePath() within the Global.asax file.
I set that to mypage.aspx in the Application_BeginRequest Sub of Global.asax like:
HttpContext.Current.RewritePath("mypage.aspx")
and it redirects every request for an aspx file (existent or not) to mypage.aspx - so I'm pretty sure I'm getting close!
Any help on finishing the next bit would be brilliant! Thanks!
I've written a page which takes a number of variables as querystrings, eg:
mypage.aspx?id=123&action=show
What I'd like to do, instead of using the string above, is use a sort of file structure look (ie separate variables by a '/') such as:
mypage.aspx/123/show
Or even better:
mypage/123/show
I know this is possible, because I have seen it done. I've done some research into it and it looks like it has something to do with HttpContext.Current.RewritePath() within the Global.asax file.
I set that to mypage.aspx in the Application_BeginRequest Sub of Global.asax like:
HttpContext.Current.RewritePath("mypage.aspx")
and it redirects every request for an aspx file (existent or not) to mypage.aspx - so I'm pretty sure I'm getting close!
Any help on finishing the next bit would be brilliant! Thanks!