How can I specify the relative path for a file

Platform: ASP.NET| Category: Basic

Suppose you have following file hierarchy:


default.aspx
Admin/login.aspx
Misc/testpage.aspx

And you are on the login.aspx and want your user to navigate to the default.aspx (or testpage.aspx) file. Then you can use

  • Response.Redirect (‘../default.aspx’)
  • Response.Redirect (‘../Misc/testpage.aspx’)

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.