I have begin testing my application with IE and have found that buttons that are styled using JQuery UI button are posting their entire content to the server. This means that they post a span with the text inside it. This triggers a "A potentially dangerous Request.Form value was detected from the client" error in ASP.Net. This does not happen with <input type=Submit />
but does with Button
elements. However I have button elements which trigger JavaScript and so should not be set up as <input type=Submit />
.
How do I fix this? It seems that it must be common enough that there is a widely accepted solution but I haven't been able to find anything by searching.