Friday 9 October 2009

ASP.NET 3.5 Validation(): element is not supported

I am currently in the process of breaking my 3.5 cherry, loving the MVC stuff btw. Anyhoo I came across this problem where VS 2008 wasn't recognising 3.5 Webforms Controls in a 3.5 Webforms App! Every control I tried to add gave this warning:

Validation(): {control type} element is not supported

Solution:

Remove the Reference to the 3.5 Webforms Controls from the Web.config file:

<controls>
<add tagprefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<add tagprefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
</add>

Then rebuild the project. Go figure!

Thanks to this guy: http://forums.asp.net/t/1383876.aspx for the post.