Redirect's strange behaviour
-
Hello! I use Response.Redirect(url,true) for return to the same page in edit mode, after creation of object. But for some reason it doesn't work correctly :sigh: After Response.Redirect(url,true) fulfills in PageLoad in debug mode it doesn't get in (!IsPostBack) section : (( .. Thank you.
-
Hello! I use Response.Redirect(url,true) for return to the same page in edit mode, after creation of object. But for some reason it doesn't work correctly :sigh: After Response.Redirect(url,true) fulfills in PageLoad in debug mode it doesn't get in (!IsPostBack) section : (( .. Thank you.
-
Nimua wrote:
it doesn't get in (!IsPostBack) section : (( ..
what do you mean by that? A response.redirect isnt a postback
The answers posted by me are suggestions only and cannot be used in anyway against me.
I know that it is not a postback, and It is usually get into section if (not is postback) in pageload, where it calls DataBind. In my opinion this is normal for Response.Redirect. And in my case Response.Redirect("url",true); then in debugg mode I have a breakpoint in PageLoad
if (!IsPostBack)
{
Page.DataBind();
}
else
{
//else section
}it goes to the "else section" ... and i don't understand why :(