ASP.NET PreInit() and IsPostBack property
What does PreInit() do by checking IsPostBack property?
Genererally while explaining PreInit() lot webpages s开发者_运维技巧ay it checks IsPostBack property. But they don't tell what will PreInit do if IsPostBack is true or IsPostBack is false?
It's explained here ( http://msdn.microsoft.com/en-us/library/ms178472.aspx ) that you can use the value of IsPostBack to determine if it's a postback or not. If it is a postback the values of the controls on the page will not be set yet.
If page is posted, role of preinit to load the data existed on page before post.
精彩评论