Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
Why Do IsPostBack and Master.IsPostBack Always Fire Twice?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Joey, post: 504969"] I am currently working on a (file-system) website in C# in VS2005. I am programming counters for the different webpages. I wrote a class and enum with functionalities exposed like... Counter.Hit(PageCounter.Home) ....and then I put it in the Page_Load section and within the if(!Page.IsPostBack) block on my web form. I can see that during debugging that the !Page.IsPostBack block fires and tests true (the code within is executed) TWICE each time the page is viewed. This is really weird. Why does it do it twice each time? This page is webform that is linked to a master page, if that makes any difference. I also tried !Page.Master.IsPostBack, but I got the same behavior. Does anyone have any ideas on this? I can't afford to have my counter hit twice each (one) time a page is accessed! Thanks. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
Why Do IsPostBack and Master.IsPostBack Always Fire Twice?
Top