I have constructed a form in ASP.NET MVC 2 that is bound to a Model, using code similar to below to generate my inputs and wrapping them within Ajax.BeginForm("MyAction").
<%: Html.TextBoxFor(Function(m) Model.SomeProperty, New With {.class = "myClass"})%>
This all seems to work fine until I enter text such as <html>, at which point the Action my form is pointing to is no longer hit. I’ve tried a number of different combinations of input text, and it seems to only stop working when entering some form of HTML/XML.
Is this a known issue with the TextBoxFor method in general, or am I missing something?
Have you disabled request validation?
It sounds like that could be the cause. Try adding the following attribute to your action method to disable it
If you are using .Net 4.0 you will also have to set the validation mode in your web.config file