Preventing ASP.NET from encoding special characters

G

Guest

Hello,

I'm trying to add an attribute to a cell:

td.Attributes.Add("ondblCilck",
"OpenWindow('location.aspx?id=4&purpose=new')");

The trouble is, asp.net encodes this and sends the response back to the
browser as:

<td ... ondblClick="OpenWindow('location.aspx?id=4&purpose=new');"...

If you notice it changed the "&" to "&amp;". This encoding process makes
sense under normal conditions, but how do I prevent that from happening in
this particular case? Any help would be appreciated.

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top