Full postback triggered by LinkButton inside GridView inside UpdatePanel

You need to register each and every LinkButton as an AsyncPostBackTrigger. After each row is bound in your GridView, you’ll need to search for the LinkButton and register it through code-behind as follows:

protected void OrderGrid_RowDataBound(object sender, GridViewRowEventArgs e)  
{  
   LinkButton lb = e.Row.FindControl("MarkAsCompleteButton") as LinkButton;  
   ScriptManager.GetCurrent(this).RegisterAsyncPostBackControl(lb);  
}  

This also requires that ClientIDMode="AutoID" be set for the LinkButton, as mentioned here (thanks to Răzvan Panda for pointing this out).

Leave a Comment