Can anyone tell me what I need to include besides System.ComponentModel.DataAnnotations to get [AllowHtml] to be recognized? When I add the attribute to a property it tells me the following compiler error:
"The type or namespace name 'AllowHtml' could not be found (are you missing a using directive or an assembly reference?)"
I need to allow html to my field and cannot continue until I get this working. Any help would be greatly appreciated!
Thanks...
As far as I can tell, [AllowHtml] belongs to the System.Web.Mvc namespace. http://msdn.microsoft.com/en-us/library/system.web.mvc.allowhtmlattribute(v=vs.98).aspx
I had this same issue and took me a while to realise that I was referencing system.web.mvc v2 not v4, so make sure you check the version.
FYI, I had my models stored in a separate project
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With