aspx file location

  • Thread starter Thread starter Daves
  • Start date Start date
D

Daves

my application directory in short:

Blog (dir)
-blog.aspx
-blog.aspx.cs
default.aspx
login.aspx

All this located in c:\MyWebs\BlogApplication\

from the blog.aspx code I use Response.Redirect(login.aspx) and tries to
find that file within Blog directory. If I add "\login.aspx" it tries to
find it in the uppermost root, that is under "MyWebs" directory!! Help!
 
Hello Steve C. Orr [MVP, MCSD],

Even better may be to use the ~ operator. ~ resolves to the application root.
This way, this code behind file could be moved to wherever in the heirarchy
without breaking.

Response.Redirect("~/login.aspx");
 

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

Back
Top