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
' 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
相关文章推荐
- [VB.NET]如何取得當前網頁代碼的classname?
- 如何取得GridView中的HyperLinkField 的Text (zz)
- 如何给VB.net2008创建发送与接收端程序
- [转][ASP.NET]如何取得GridView中隱藏欄位的值
- 如何取得GridView中的HyperLinkField 的Text
- [VB.NET]如何取得記錄號,急!
- [VB.NET]如何取得动态控件中的值?
- VB.Net WebBrowser如何取得鼠标点击位置的标签
- [VB.NET]如何取得DATAGIRD里CHECKBOX和TEXTBOX的值?
- C#,VB.NET 如何将Excel转换为Text
- [VB.NET]请问如何取得多选中的listBox当前选中的文本内容?
- [VB.NET]如何快速给100个textbox.text赋值?
- C#,VB.NET如何将Word转换为PDF和Text
- 如何在vb.net中取得两时间的毫秒差
- [VB.NET]如何将TEXT中的文字导入到Word?知道的进下
- VB.NET 2008 获取MD5加密
- ASP.NET中GridView和Repeater重复数据如何合并
- 教你如何在VB.NET中应用SQLDMO对象
- 如何轻松调整VB.NET控件
- vb.net中如何结束一个线程