Sunday, March 11, 2012

How can I add the PostBackTrigger on ButtonField in DetailsView?

I had the following code in the RC version for doing the same for a ImageButton in a gridview.

protected void GridArbPl_RowCreated(object sender, GridViewRowEventArgs e)
{
try
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
ImageButton Ibtn = (ImageButton)e.Row.FindControl("ImgBtnSelectGridArbPl");
ScriptManager1.RegisterPostBackControl(Ibtn);
}

}
catch (Exception ex)
{
throw ex;
}
}

No comments:

Post a Comment