Method in WebUserControl is called many times
I have a method in WebUserControl which is called twice in my code once from the Page_load event of WebUsercontrol (Inside !isPostback) and second in the page_Load event of Page where this WebUserControl is u开发者_StackOverflow社区sed (again in !ispostback).
But I kept a breakpoint on this method and observe that this is called around 8 times.
This method is called even when I log-In into the application.
I understand that if you AutoEventWireup = "true" then the page_Load method is called twice.
But why this method is called 8 times?
Why this method is called on Login Page?
Please suggest
Thanks
May be your WebUserControl renders again and again like your page is creating postbacks so that method runs many time.
精彩评论