I have two distinct updatepanels on my page and each of them have triggered by different buttons that are placed in different repeaters, updapenels work properly and to avoid from conflict i had setted their UpdateMode="Conditional" but i can't determine the id of updapanel which is triggering.
In InitializeRequest and EndRequest events, i need to determine which updatepanel triggered and then i can do some client-side animations specified on this updapanel.
Thanx.
So after all researches, the best practice looks like that:
Using
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequest)andSys.WebForms.PageRequestManager.getInstance().add_beginRequest(InitializeRequest)i added all my triggers a data attribute like
and at the request handlers look like that
helper method is like :
The trick is starting now, as you had seen above
window[posterSid]gives you the given named js object. if you check myRequestHandlers; they are using two methods asconsernedObject.Start();andconsernedObject.End();which are predefined in another js file named AjaxObjects.For example :
This method have solved all my problems but one that i need to take a parameter from serverside, which can be achived by using
hiddenField.