Wrong Selection GridView ASP.NET

Cristian Gomez 21 Reputation points

Hello Friends, I am trying to select a cell from a gridview and send it to another page but the truth is that it selects anything for me. Tried several alternatives and nothing. I hope you can give me a hand.


Dim index As Integer = GridView1.SelectedRow.RowIndex  
        Dim TctValue As String = GridView1.SelectedRow.Cells(1).Text.ToString()  
        Dim contacto As String = GridView1.SelectedRow.Cells(0).Text  
        Session.Add("recid2", TctValue)  
        Session.Add("contacto", contacto)  
        Response.Redirect("~/datos_contacto.aspx?colect=" & TctValue)  
A set of technologies in the .NET Framework for building web applications and XML web services.
3,319 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yijing Sun-MSFT 7,071 Reputation points

    Hi @Cristian Gomez ,
    Currently in Microsoft Q&A we only support English, could you please edit your question into English?Then we can help to solve your issues, thanks for your understanding.
    According to your result, you may have garbled.What's your TctValue's value?

    Best regards,
    Yijing Sun

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our  documentation  to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Cristian Gomez 21 Reputation points

    Hello @Yijing Sun-MSFT ,

    I already modified the question.
    The value that I must obtain is the one of the column (1) "8(#%.mz)!!$¶", but it gets me "8(#%.mz)!!$¶"

    0 comments No comments

  2. AgaveJoe 26,246 Reputation points

    ¶ us the URL encoded value of ¶. URL decode the value to get the paragraph character.

    0 comments No comments

  3. Cristian Gomez 21 Reputation points

    Hello @AgaveJoe ,
    how can i decode?

    0 comments No comments