0

I'm building a page in C# and I'm getting a cell value from GridView1 with a code and I'm receiving this:

Tendências de Desfiles

How can I convert it to this:

Tendências de Desfiles

...using C#? I tried it:

categoria = System.Text.Encoding.UTF8.GetString(System.Text.Encoding.GetEncoding("iso-8859-1").GetBytes(row.Cells[1].Text));

But don't work so please, help me to fix it.

Nasreddine
  • 36,610
  • 17
  • 75
  • 94
Lucas Müller
  • 382
  • 1
  • 4
  • 21

1 Answers1

2

You need to decode your text:

using System;
using System.Web;

public class Program
{
    public static void Main()
    {
        string encodedText = "Tendências de Desfiles";

        string decodedText = HttpUtility.HtmlDecode(encodedText);

        Console.WriteLine(decodedText);
    }
}