471,120 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,120 software developers and data experts.

linkbutton command argument value

Hi,
Iam using Gridview in Asp.net, for that i added one linkbutton using template field, for linkbutton iam added command argument now i want when i click that linkbutton i want that linkbutton text value or that command argument value how to get that?
May 26 '08 #1
1 2362
dip_developer
648 Expert 512MB
Hi,
Iam using Gridview in Asp.net, for that i added one linkbutton using template field, for linkbutton iam added command argument now i want when i click that linkbutton i want that linkbutton text value or that command argument value how to get that?

Expand|Select|Wrap|Line Numbers
  1.  
  2. Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs)
  3.         ' If multiple ButtonField column fields are used, use the
  4.         ' CommandName property to determine which button was clicked.
  5.         If e.CommandName = "Select" Then
  6.             ' Convert the row index stored in the CommandArgument
  7.             ' property to an Integer.
  8.              Dim index As Integer = Convert.ToInt32(e.CommandArgument)
  9.  Dim btnText As String=sender.Text
  10.  
  11.         End If
  12.     End Sub
May 27 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by CodeRazor | last post: by
10 posts views Thread by Vi | last post: by
reply views Thread by BLiTZWiNG | last post: by
13 posts views Thread by rn5a | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.