asp.net - UpdatePanel Conditional updatemode not working -


i found this thread while trying resolve issue unfortunately can't seem figure out problem since have way should be.

i've got 3 updatepanels each call function on .js file setup this:

<asp:updatepanel id="uppnlgeneralinfo" runat="server" updatemode="conditional" childrenastriggers="true">         <contenttemplate>         <script type="text/javascript">             sys.application.add_load(bindpageload);          </script> 

each have different id of course. whenever control calls postback within update panel works, in js file added console.log("running js file") , can see it's being called 3 times meaning it's 3 updatepanels being refreshed instead of one.

all triggers inside each of respective updatepanels shouldn't need add triggers (i did make sure , makes no difference). shouldn't updatemode=conditional resolve this?

also worthy mention, none of code behind ever calls updatepanel.update(). tried adding each control respective panels , made no difference.

any ideas?

it doesn't mean update panels being refreshed.

the msdn docs client load events raised after either synchronous (full page postback) or asynchronous (partial page) postback.

this might mean 1 of update panels refreshing intended, 3 event handlers run again after async postback because of how hooked using ms ajax.

msdn excerpt:

client events of application , pagerequestmanager classes
sys.application.load event

  • sys.application.add_load(handler);

raised after scripts have been loaded , objects in application created using $create initialized. load event raised postbacks server, includes asynchronous postbacks.
-- http://msdn.microsoft.com/en-us/library/bb386417.aspx

working partial-page rendering events states different event runs when entire page loads:

during ordinary page processing in browser, window.onload dom event raised when page first loads
-- http://msdn.microsoft.com/en-us/library/bb398976.aspx

this regular dom load method, not part of ms ajax.

therefore assume if hook client code regular window.onload event run when full page loads, on first time, not on successive async postbacks (aka update panel/partial refresh).

whether or not knowledge harnessable provide outcome want i'm unsure. maybe you're looking @ ms ajax objects solution when hybrid browser/ms ajax client solution exists.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -