views:

463

answers:

1

I'm trying to enter a little bit of HTML into an ASP.NET Dynamic Data MultilineText_Edit control, just a couple of <br> tags to have line breaks when I output the value of the column on a web page.

However, when I try to click the "Update" link on the Dynamic Data edit page, nothing happens. I don't even get an error message, which I would expect if HTML input were not allowed via some rule the control has built in. As soon as I remove the tag, the update link works correctly. It's not a column size issue, I can add a bunch more characters to the input and everything works fine.

Is HTML input not allowed in these controls, or is there something else going on? If there is some kind of validation rule, can it be turned off? Or is there something in the database that I need to set? Should I use something other than the default multiline text template?

+2  A: 

Input validation is a built in feature in ASP.NET 2.0 or later. I don't know why you are not getting an error, but check this out to see if it helps:

http://www.asp.net/learn/whitepapers/request-validation/

Check these settings, on the page:

<%@ Page validateRequest="false" %>

or the web.config:

<configuration>  
  <system.web>
    <pages validateRequest="false" />
  </system.web>
</configuration>
craigmoliver
The default edit.aspx template uses the UpdatePanel and it's not setup (by default) to show that type of error. So turning off validation is the way to enable it. That *should* be safe enough for an Intranet app, right?
AndrewDotHay