Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3691356
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:08:19+00:00 2026-05-19T04:08:19+00:00

i have a button in gridview whose command name is hold i want when

  • 0

i have a button in gridview whose command name is “hold” i want when i click n hold button of first row then the whole row values will be transfererd to default2.aspx …

and if i click the hold button of gridview second row then the second row value will be transferred to Default2.aspx ,,how to do that ?

i m using that …but it always transfer the 1st row value even i select first last or middle row ..in gridview ….

whats wrong in this code ?

Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
        For Each myRow As GridViewRow In GridView1.Rows
            'Find the checkbox
            Dim lab5 As Label = DirectCast(myRow.FindControl("Label5"), Label)
            If e.CommandName = "feedback" Then
                Me.Response.Redirect("~/view_feedback.aspx?" & "serv_code=" & lab5.Text.ToString)
            End If
        Next
    End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:08:20+00:00Added an answer on May 19, 2026 at 4:08 am

    try this code

     Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
         If e.CommandName = "feedback" Then
             Dim index As Integer = Convert.ToInt32(e.CommandArgument)
             Dim myRow As GridViewRow = GridView1.Rows(index)
             Dim lab5 As Label = DirectCast(myRow.FindControl("Label5"), Label)
             Me.Response.Redirect("~/view_feedback.aspx?" & "serv_code=" & lab5.Text.ToString)
         End If
     End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have GridView which I can select a row. I then have a button
I have a gridview button that I programmatically created and I want to load
I have a gridview with these columns: id,name,price,quantity,total. Also i have a button and
I have a button on an ASP.Net page that will call Response.Redirect back to
I have successfully implemented my GridView now, but, as always, the whole ASP.NET life
I have a gridview in which itemtemplate contains hiddenfield.I have a button outside gridview.In
I have button in one of the columns in a gridview. On clicking on
I have radio button list in a gridview that needs to be bound to
I've got a gridview/formview, master/detail relationship going on. When I click a button in
I have TextBox1 whose Default text is Sumit and a gridview with records and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.