Get previous page URL after Response.Redirect

前端 未结 4 1718
眼角桃花
眼角桃花 2020-12-21 04:54

I\'m trying to get the previous page URL after I do a response write and i\'ve looked around the web and people are using HTTP_REFERER but that doesn\'t work wi

4条回答
  •  时光取名叫无心
    2020-12-21 05:19

    You can pass the URL of the previous page to the error page's URL. something like

    Response.Redirect("servererror/default.aspx?404&url=/folder/page.aspx")

    And then get the url value on the error page and redirect it to the previous page.

提交回复
热议问题