Senator Guerra Souty original series calendar,replica hublot blue steel peach pointer collocation of rolex replica Rome digital scale, track type minute replica watches scale shows that the classical model is swiss replica watches incomparable, wearing elegant dress highlights.
mr-ponna.com

 

YOU ARE HERE: HOME Questions How to identify which control caused Postback



Identifying the control caused PostBack

View(s): 32870

How to identify which control caused Postback?

Answer 1)

Below code will help you to identify the control which caused the postback.
The name of the control which caused the postback will be set in
__EVENTTARGET by  __doPostBack JavaScript function before the form is
submitted.

string ctrlname = page.Request.Params.Get("__EVENTTARGET");
if (ctrlname != null && ctrlname != string.Empty)
{
    return this.Page.FindControl(ctrlname);
}

  Asked in:  TCS (Tata Consultancy Services)   Expertise Level:  Intermediate
  Last updated on Tuesday, 12 March 2013
2/5 stars (18 vote(s))

Register Login Ask Us Write to Us Help