Asp.net page_load function is loading twice.. hence it affects my page performance. Does anyone know the reason it is loading twice.
No, iam not calling the page load function anywhere...
Asp.net page_load function is loading twice.. hence it affects my page performance. Does anyone know the reason it is loading twice.
No, iam not calling the page load function anywhere...
Please find the solution here........
Check if the Load events have Handlers for Base class and the child class
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load, Me.Load**If it is just Remove the Me.Load from the event , now check your page. Hope this may be useful and solve your issue.
For me, this issue cropped up suddenly after the Oct. 2017 Windows update. I noticed that for pages made accessible to anonymous users via a Location element in web.config, it is now necessary to also grant access to any assets referenced by that page, for example images, stylesheets, etc. The below example grants anonymous access to the login page and the 'images' directory (aka folder):
Update: I found a second cause of Page_Load being called twice. In old, legacy code, some pages' .aspx.designer.cs files contained inconsistencies that apparently hadn't caused problems until now. Instead of attempting repair, I created new pages, which eliminated the double load event.
Just ran into this problem, and thought I would post an answer summarizing what I found, plus my actual issue.
and finally my issue....
My page inherited from a class that included a Page Load handler, which inherited from a class with a Page Load Handler.
I tested this, and if you put a Handles on the method in MyPage, it will get hit 3 times...
I had the same problem and Solved.
I Checked my Global.ascx and My rewrite rules.
When the page requested, URL did not have "/" at the end of URL and a redirect happened from "x.com/x" to "x.com/x/" according to my configuration for SEO standards.
So anything works well and your internal links should have "/" at the end of URLs to avoid multiple loads.
Please try making the changes mentioned in this link. http://social.msdn.microsoft.com/Forums/en/vbgeneral/thread/ccc75925-3460-497c-8471-fcebecd8d061
BTW I googled
Page_Load Being called twice
For me It was a blank image tag.