问题
I have link to the Page3 from Page1 and Page2.
In Page1 I have a gridview and when A row is selected it redirects to the Page3 and it passes a msgID to page3 in the URL. And in Page3 URL if someone tries to change the URL it redirects to Page1.
In Page2 I have a modal Pop up which is displayed in page2 after postback, the popup has a button to view Page3 and it passes the msgID to page3 in the URL.
Response.Redirect(string.Format("Page3.aspx?MsgID={0}", msgid));
When the Page3 is redirected from page1 everything is fine. When I redirect to page3 from page2 it gets redirected to page1. I am not able to view the page3 from page2. What mistake I am doing. thanks
Page load in Page3:
if (!IsPostBack)
{
if (this.Page.PreviousPage != null)
{
}
else
{
Response.Redirect("page1.aspx");
}
}
来源:https://stackoverflow.com/questions/7740517/postback-error-page-not-displayed-when-redirected-after-postback