Response.Redirect using ~ Path

后端 未结 3 963
星月不相逢
星月不相逢 2020-12-14 00:34

I have a method that where I want to redirect the user back to a login page located at the root of my web application.

I\'m using the following code:



        
3条回答
  •  长情又很酷
    2020-12-14 01:30

    What about using

    Response.Redirect(String.Format("http://{0}/Login.aspx?ReturnPath={1}", Request.ServerVariables["SERVER_NAME"], Request.Url.ToString()));
    

提交回复
热议问题