linkbutton command argument value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ganesh22
    Banned
    New Member
    • Sep 2007
    • 81

    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?
  • dip_developer
    Recognized Expert Contributor
    • Aug 2006
    • 648

    #2
    Originally posted by ganesh22
    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?

    [CODE=vbnet]
    Sub GridView1_RowCo mmand(ByVal sender As Object, ByVal e As GridViewCommand EventArgs)
    ' If multiple ButtonField column fields are used, use the
    ' CommandName property to determine which button was clicked.
    If e.CommandName = "Select" Then
    ' Convert the row index stored in the CommandArgument
    ' property to an Integer.
    Dim index As Integer = Convert.ToInt32 (e.CommandArgum ent)
    Dim btnText As String=sender.T ext

    End If
    End Sub[/CODE]

    Comment

    Working...