您的位置:首页 > 编程语言 > VB

vb.net 2008的gridview中如何取得ButtonField的text值和boundfield的值

2008-06-03 22:28 344 查看
Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand

' Convert the row index stored in the CommandArgument
' property to an Integer.
Dim index As Integer = Convert.ToInt32(e.CommandArgument)

' Retrieve the row that contains the button clicked
' by the user from the Rows collection.
Dim row As GridViewRow = GridView1.Rows(index)
Dim ss, ss1 As String
ss = CType(row.Cells(0).Controls(0), LinkButton).Text'获得LinkButton的值
ss1 = row.Cells(1).Text '获得boundfield的值

End Sub
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: