G
Guest
How can I stop ASP.NET Encoding things automatically?
e.g if I create a button in my code and add the following attribute
objNewButton.Attributes.Add("onClick", "GotoUrl('http://test.asp?X=1&Y=2');");
Then When the button is rendered into HTML the output is something like this
onClick="GotoUrl('http://test.asp?X=1&Y=2);"
Which obviously messes up the parameters in the querystring.
Is there any escape code I can pass to tell ASP.Net to leave the string alone?
e.g if I create a button in my code and add the following attribute
objNewButton.Attributes.Add("onClick", "GotoUrl('http://test.asp?X=1&Y=2');");
Then When the button is rendered into HTML the output is something like this
onClick="GotoUrl('http://test.asp?X=1&Y=2);"
Which obviously messes up the parameters in the querystring.
Is there any escape code I can pass to tell ASP.Net to leave the string alone?