Groups | Blog | Home
all groups > asp.net > march 2005 >

asp.net : aspx file location



Steve C. Orr [MVP, MCSD]
3/3/2005 3:44:37 PM
Response.Redirect("../login.aspx")

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net


[quoted text, click to view]

Daves
3/3/2005 11:14:13 PM
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!

Matt Berther
3/4/2005 3:55:05 PM
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");

--
Matt Berther
http://www.mattberther.com

[quoted text, click to view]


AddThis Social Bookmark Button