I get an error when my textbox has texts with html tags
-
A potentially dangerous Request.Form value was detected from the client. I have a webpage using .net 2.0 with an asp:button Back and a textbox with text = "" I've done my research and everything I see says set ValidateRequest="false" in page directive which I did. There's no problem if I click the browsers back button. But when I click my own asp button BtnBack, the error is produced. Is there something like setting the validation within my own button? Thanks!
-
A potentially dangerous Request.Form value was detected from the client. I have a webpage using .net 2.0 with an asp:button Back and a textbox with text = "" I've done my research and everything I see says set ValidateRequest="false" in page directive which I did. There's no problem if I click the browsers back button. But when I click my own asp button BtnBack, the error is produced. Is there something like setting the validation within my own button? Thanks!
Hi, When browser back button is clicked, no new request is sent to browser, I think(unless we expire the page programmatically). Most probably, you have written a Response.Redirect in your asp button click, right? So, the html code gets posted to the server and server generates the error. You can either call History.Back(or something like that in javascript) in your button click or you can set ValidateRequest = "True" Regards, Jim