使用GridView裡的控制項

LinkButton當範例

1. 使用於RowDataBound,需判斷是資料列才做事情
有可能是Header,Footer等等
If e.Row.RowType = DataControlRowType.DataRow Then ...

2.取得物件
Dim lb As LinkButton = e.Row.Cells(0).FindControl("LinkButton1")

3.判斷有取得物件,才做事情
If lb IsNot Nothing Then ...

沒有留言: