Posted By

jink on 05/20/09


Tagged

aspnet postback


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

umang_nine


ASP.net: Retrieve PostBack sender (on Page_Load)


 / Published in: C#
 

Returns the postback sender ID. This is usually a button ID from a form that caused a post back.

  1. /// <summary>
  2. /// Returns the sender ID of the post back received by ASP.net.
  3. /// (Usually a button's ID)
  4. /// </summary>
  5. /// <returns></returns>
  6. private string GetPostBackSender()
  7. {
  8. return Request.Params.Get("__EVENTTARGET");
  9. }

Report this snippet  

You need to login to post a comment.