The Reason behind this error is that .Net detected one HTML statement as the text of the TextBox. So in order to avoid this error you have to disable the request validation on that page. To disable request validation on a page please try to set the ValidateRequest
attribute of the Page
directive to false as follows.
<%@ Page validateRequest="false" %>
For .Net 4, please try to add requestValidationMode="2.0"
in the httpRuntime
configuration section of the web.config as follows.
Please provide your full code if it doesn't help.