Wednesday, August 11, 2010

How to access control from the GridView ASP.NET?

I have several templated columns and a button control in the GridView.I want to access the buttons inside it.How to access control from the GridView ASP.NET?
the following is in c#





Button myBtn = (Button) GridView1.FindControl(';MyButtonName';);





if (myBtn != null)


{


// do your stuff here.


}

No comments:

Post a Comment