How to check if a specific control caused postback?
Let's say you have a button ( btnAdd ) among other controls...
To check if it has just caused postback, place the next code in Page_Load event handler:
protected void Page_Load(object sender, EventArgs e)
{
// If button btnAdd is clicked
if (Request.Params.ToString().IndexOf("btnAdd") > 0)
{
// do something here
}
else
{
// do something else
}
}