Monday, January 28, 2013

Want to know which control caused the post back in the asp.net c# page. You can use this method:

 

if (Page.Request.Params.Get("__EVENTTARGET").Contains(“ControlID”)

{

//write your code here

}

 

And if the control is button, you could use the same above code+:

if (Request[buttonID.UniqueID] != null)
{           

// your code here.

          }

No comments:

Post a Comment