Remove Escape Sequence Not Working

I have HTML code like this:

 <tr>
     <th colspan="2" style="padding: 10px; font-size: 11px; background: #eee; border: 1px solid white" align="left">
         Some Text Here                    
     </th>
 </tr>

I am storing this in string like this:

 string gtr = 
        @"<tr>
            <th colspan=""2"" style=""padding: 10px; font-size: 11px; background: #eee; border: 1px solid white"" align=""left"">
                 Some Text Here
            </th>
        </tr>";

But When I Debug It Show String Like this:

<tr>
     <th colspan=\"2\" style=\"padding: 10px; font-size: 11px; background: #eee; border: 1px solid white\" align=\"left\">
         Some Text Here
     </th>
</tr>

It Show Escape Sequence Characters.

It Tried to remove them like this

gtr = gtr.Replace(@"\","");

and use all other possible methods

But this not working it always show string gtr with Escape Sequence Character.

How to achieve string without Escape Sequence Character and gives only clear HTML code.

I am only Using ASP.NET with C# and not Using MVC and this is a static content.

Jon Skeet
people
quotationmark

But When I Debug It Show String Like this

That's because you're looking at the string in the debugger. The string doesn't actually contain those backslashes - they're just part of the debug output, which escapes various characters to make it look like it would as a regular string literal in code.

Write the string to a file or the console and you'll see the backslashes really aren't there.

As an alternative way of convincing yourself of this even in the debugger, try this:

 string x = "\"\"";
 int y = x.Length;
 char z = x[0];

Then in the debugger you'll see that y is 2, and z is just " - it may be escaped again, but clearly it can't be both characters in \" as it's just a char.

people

See more on this question at Stackoverflow