site-root relative redirects

E

epigram

I've got an asp.net project where I have created a subfolder (for
organizational reasons) that contains several .aspx files. One thing I want
to be able to do in the codebehind for these files is redirect to an aspx
file in the root folder. The code that does this is actually in the base
class for all my codebehind files (a class that inherits from Page). So,
the redirect statement needs to work when the code executes for a page in
the root folder as well as in the subfolder. I tried to redirect using a
site-root relative path (e.g. Response.Redirect("/MyRootFile.aspx") ), but
when I try this I get a "Server Error in '/' Application" error. i.e. HTTP
404 for the requested Url: /MyRootFile.aspx.

Is there a way to do this? BTW, I'm running this application from within
Visual Studio on a XP Pro PC.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top