ASP.net disable post processing

Vote:
 

Not sure if its episerver releted, but I'm trying to print some json encoded strings that contains URLs but the server keeps "correcting" them.

Here are some examples of what the server is doing:

Response.Write("<a href=\\\"http://www.google.com\\\">asdf</a>");
Response.Write("<a \"http://www.google.com\">asdf</a>");

Results in:

<ahref="\"http://www.google.com\"">asdasd</a>
<a>asdasd</a>

And that is clearly not what I intended...

How can I stop the server from doing this?

Thanks in advance. 

#54457
Oct 17, 2011 19:12
Vote:
 

You're right it's not episerver related.

You are escaping the characters wrong and trying to create html-tags that aren't correct. Your two lines of code should look like this:

            Response.Write("<a href=\"http://www.google.com\">asdf</a>");
Response.Write("<a href=\"http://www.google.com\">asdf</a>");

 

#55264
Nov 24, 2011 11:31
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.