Post Pic

Umbraco DatePicker – Unknown server tag

I have recently needed to use the Umbraco datePicker control in a usercontrol I was creating however I kept getting presented with an “Unknown server tag ‘umbraco:datePicker” exception. After some digging around in the Umbraco Source it is confusingly not in the assembly I would have expected but it was in fact located in the cms.dll and not controls.dll. As a couple of other Umbracians posted this query a day or so after I found the solution I thought I would post it up for the benefit of others.

Simply include the following in your usercontrol:

<%@ Register TagPrefix="umbraco" Namespace="umbraco.controls" Assembly="cms" %>

and then use it as follows:

<umbraco:datePicker ID="datePicker1" runat="server" ShowTime="true"></umbraco:datePicker>

I hope this is of help to others and can be refactored asap to avoid any further confusion.

Related Posts

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

One Response

03.02.10

Hello, sorry for commenting so long after the post, but this is the only place I could find anyting on this issue. However, if I try and use the datePicker control with the above method I still get “element datePicker is not a known element” message. I also get a compile error on the declaration of the datePicker control that “the type of namespace name datePicker does not exist in the namespace ‘umbraco.controls’. I have referenced cms.dll and controls.dll

Has the control been moved since your post? I’m using umbraco V4.5.2

Thanks for any assistance!

Leave Your Response

* Name, Email, Comment are Required

Umbraco Certified Developer
FreshBooks
ElasticHosts: Flexible Servers in the Cloud
SagePay Approved Partner
Microsoft WebsiteSpark