现在的位置: 首页 > 综合 > 正文

GridView1_RowCreated()

2013年06月16日 ⁄ 综合 ⁄ 共 519字 ⁄ 字号 评论关闭
Protected Sub GridView1_RowCreated(ByVal sender As ObjectByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowCreated
        
If (e.Row.RowType = DataControlRowType.DataRow) Then
            
Dim bt1 As Button = CType(e.Row.FindControl("cart"), Button)
            bt1.CommandArgument 
= e.Row.RowIndex.ToString
            
Dim bt2 As Button = CType(e.Row.FindControl("favorite"), Button)
            bt2.CommandArgument 
= e.Row.RowIndex.ToString
        
End If

    
End Sub

抱歉!评论已关闭.