getting textbox value in buttonclick in gridview

  • 12 years ago

    hi..

    I have a textbox & a button in all rows of gridview. I want to access this textbox value when button in the same row is clicked. But how do i get the rowindex in button click event....

  • 12 years ago

    hi,

    If you are adding the button to the gridview, then you will probably get the ItemCommand event being fired on the Gridview.  From there you should be able to access information from the item, such as the control that fired the event, the row that it sits on etc.

    You should then be able to get back to all the elements you need.

    Regards

    Si

  • 12 years ago

    Hi

      Thnx for replying but i have been able t osolve my problem using commandargument...

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“My definition of an expert in any field is a person who knows enough about what's really going on to be scared.” - P. J. Plauger