Correct way to do a Response.Redirect from one page to another on the same site

前端 未结 3 548
清歌不尽
清歌不尽 2020-12-31 22:04

I\'m sure this has been asked time and time again. And yes I\'ve searched. However, I\'m unable to find an example that clearly demonstrates what I\'m looking to accomplis

3条回答
  •  一生所求
    2020-12-31 22:09

    If your page is on the same directory level you can just use:

    Response.Redirect("testing.aspx", false);
    

    If your page is on application root you can use following command:

    Response.Redirect("~/testing.aspx", false);
    

    And finally, if you page is inside sub directory from current page you can use:

    Response.Redirect("MyFolder/testing.aspx", false);
    

提交回复
热议问题