Home > SharePoint, SharePoint 2010, SP2010 > The Type or namespace name “DateTimeControl” does not exist in the namespace “Microsoft.SharePoint.WebControls”

The Type or namespace name “DateTimeControl” does not exist in the namespace “Microsoft.SharePoint.WebControls”

If you create an empty SharePoint 2010 project in Visual Studio 2010 and then add a visual Web Part (Sandboxed) you will get an error when you try to debug.

The Type or namespace name “DateTimeControl” does not exist in the namespace “Microsoft.SharePoint.WebControls”


However you can add the DateTimeControl to a farm solution visual web part.

Advertisement
  1. June 10, 2013 at 19:17

    Thanks. I couldn’t find this answer anywhere else. BTW: I’m using 2013 and there’s still the same error and the same fix.

  1. No trackbacks yet.

Leave a Reply to Peter Schmale Cancel reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: