a way to identify your specific update panel on the page on server side


/ Published in: VB.NET
Save to your folder(s)



Copy this code and paste it in your HTML
  1. //logic to identify your update panel Id if there are multiple update panels on your page.
  2.  
  3. If scriptManager.AsyncPostBackSourceElementID.Equals(upUser.UniqueID) Or
  4.  
  5. //logic to identify your the control that generated this post back.
  6.  
  7. scriptManager.AsyncPostBackSourceElementID.Equals(cmdFilterUser.UniqueID) Or
  8.  
  9. //if you want to identify a specific element exist in this panel like in my case there is gridview naming "ngvAuditHistory"
  10.  
  11. scriptManager.AsyncPostBackSourceElementID.Contains("ngvAuditHistory")
  12.  
  13. Then
  14. If Request.Params("__EVENTARGUMENT") = "0" Then
  15. //your logic for the __dopostback response

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.