I have a gridview button that I programmatically created and I want to load an update panel on the client side with the sent data. I have a hidden value field that gets its data on the click of the gridview button and the dropdownlist in my updatepanel depends on that value.
Share
while calling
__doPostBackdirectly will work, it’s not a perfect solution because the name of that function is strictly speaking an implementation detail of the .Net framework.A better solution is to use
ClientScriptManager.GetPostBackEventReference, which gives you a more resilient interface to the same functionality. Do note thatGetPostBackEventReferenceandGetCallBackEventReferenceare not the same thing – the former causes a page reload (partial or full, depending on how your UpdatePanels are set up), while the latter doesn’t.