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).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…