Wrong Selection GridView ASP.NET

Cristian Gomez 21 Reputation points
2022-03-01T03:39:56.35+00:00

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.

178723-1.png
178650-2.png

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)  
ASP.NET
ASP.NET
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
    2022-03-01T06:26:58.897+00:00

    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
    2022-03-01T12:04:36.803+00:00

    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
    2022-03-01T13:28:11.48+00:00

    ¶ 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
    2022-03-01T13:42:54.553+00:00

    Hello @AgaveJoe ,
    how can i decode?

    0 comments No comments