RadDatePicker - Element 'DateInput' is missing required attribute 'runat'

17 posts, 0 answers
  1. Charles Forsyth
    Charles Forsyth avatar
    47 posts
    Member since:
    Sep 2006

    Posted 24 Oct 2008 Link to this post

    Ok, in Visual Studio 2008, after simply dragging a RadDatePicker (Ajax) onto my form, I'm seeing the following warnings in the error list...

    Validation (ASP.Net): Element 'DateInput' is missing required attribute 'runat'.

    and

    Validation (ASP.Net): Element 'Calendar' is missing required attribute 'runat'.

    I imagine this is a bug with your control (probably in the [ToolboxData()] for the RadDatePicker class)

    My question is: should I go ahead and manually add "runat='server'" for those tags in my declarative? Or is there some trick to make Visual Studio not display these warnings?

    Thanks.

     

     

  2. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 28 Oct 2008 Link to this post

    Hi Charles,

    I made a simple test by adding RadDatePicker instance in VS 2008 web site (using the latest release 2008.2.1001 of RadControls for ASP.NET AJAX) and no warnings for missing runat=server attributes were generated.

    Can you please confirm that you are using this version of the product on your machine?

    Best regards,
    Stephen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dan
    Dan avatar
    21 posts
    Member since:
    Nov 2008

    Posted 17 Feb 2009 Link to this post

    I'm having the same issues using VS 2008

    Validation (ASP.Net): Element 'DateInput' is missing required attribute 'runat'.
    and
    Validation (ASP.Net): Element 'Calendar' is missing required attribute 'runat'.

    I'm using 2008.3.1314 (Ajax). Is there an issue here?

    Thanks



  5. Matthew Bishop
    Matthew Bishop avatar
    57 posts
    Member since:
    Apr 2007

    Posted 17 Feb 2009 Link to this post

    I have tested my enviroment by dragging the control over (in fact, all the date/ time controls) and I dont get an error.

    Can I suggest removing the RadControls toolbar and reinstalling it (Should take under 5 minutes). It worked for me with a previous install of RadControls, and it may just help this time.
  6. John
    John avatar
    16 posts
    Member since:
    Jun 2009

    Posted 29 Jul 2009 Link to this post

    I have this issue with 2009.1.527.35.

    1 <telerik:RadDatePicker ID="OwnerBirthDateRadDatePicker" runat="server" ShowPopupOnFocus="True" 
    2                                 Culture="English (United States)">  
    3                                 <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" /> 
    4                                 <DateInput Width="" LabelCssClass="" DateFormat="d" /> 
    5                                 <DatePopupButton CssClass="" ImageUrl="" HoverImageUrl="" ToolTip="Open the calendar popup." /> 
    6                             </telerik:RadDatePicker> 
  7. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 30 Jul 2009 Link to this post

    Hello Mike,

    From your code snippet it seems that your calendar and date input tags do not have runat="server" attribute set as explained below. Does adding them addresses the issue in question?

    Regards,
    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  8. John
    John avatar
    16 posts
    Member since:
    Jun 2009

    Posted 30 Jul 2009 Link to this post

    Yes, this fixed the problem.  However, I find it confusing because:
    1) The auto-created markup did not produce the runat="server" tag.
    2) I couldn't find any examples in your showcase or in the help file that contained the runat="server" tag.
  9. Steven
    Steven avatar
    4 posts
    Member since:
    Sep 2010

    Posted 27 Jun 2011 Link to this post

    This is still an issue with 2011.1.519.35.
    Is there a reason why the autocreated markup doesn't automatically produce the runat="server" tag?
  10. Hus Damen
    Hus Damen avatar
    33 posts
    Member since:
    Dec 2009

    Posted 30 Jun 2011 Link to this post

    Hi,
     
    I am use the version you say and after I drop a picker from my tool box I got:

    <telerik:RadDatePicker ID="RadDatePicker1" Runat="server">
       </telerik:RadDatePicker>

    Thanks,
    Hus
  11. Steven
    Steven avatar
    4 posts
    Member since:
    Sep 2010

    Posted 30 Jun 2011 Link to this post

    Right, the problem isn't with the RadDatePicker tag, it's with the DateInput and Calendar tags that are auto-generated not having the runat="server" attribute.  
  12. Erik
    Erik avatar
    8 posts
    Member since:
    Jan 2012

    Posted 10 Feb 2012 Link to this post

    I am having the same problem! The autogenerated tags do not inclued the runat tag.

    The project still works properly, it´s just very annoying. How can I fix this?
  13. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 14 Feb 2012 Link to this post

    Hi guys,

    Can you, please, state the exact version of the RadControls you are using along with the Visual Studio version where this issue happens, so that we can investigate it further. The Input and Calendar properties in the date pickers are persisted as inner properties for the picker control, so they should not explicitly require the runat="server" attribute. Furthermore, we couldn't reproduce this issue in Visual Studio 2010.

    Veli
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  14. Chad
    Chad avatar
    1 posts
    Member since:
    Apr 2011

    Posted 22 May 2012 Link to this post

    I'm getting this same issue running RadControls version 2011.3.1305.40, and Visual Studio 2010 (Version 10.0.40219.1 SP1Rel). Please see attachment for a screenshot.
  15. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 24 May 2012 Link to this post

    Hello Chad,

    The Calendar and DateInputs are defined as a properties for RadDatePicker, and they should not have the "runat" attribute set. Indeed setting it makes no difference to the behaviour, it only fixes the intelisenses warning. I don't see any particular problem with the definition of the Calendar and the Picker inside our code. It could be some bug in the VisualStudio, that to shows this warnings.

    Regards,
    Vasil
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  16. Marc-André Turmel
    Marc-André Turmel avatar
    1 posts
    Member since:
    Jul 2009

    Posted 22 Jun 2012 Link to this post

    Sorry to "revive" this topic, but I notice this is still happening with 2012.2.411.35 on Visual Studio 2010 (10.0.40219.1 SP1Rel). The warnings will go away when I close the aspx markup window, but it is still an annoyance as they comeback if you rebuild your solution with the aspx markup open.

    With the "false warnings" generated by Visual Studio, I have seen my less experienced programmers add the "runat" attribute where it is not needed, as pointed in this thread. I would like to keep away from adding those useless attributes for the sake of keeping the code as clean as possible.

    If I use the "contracted" version of declaring those properties (such as Calendar-FastNavigationStep, for example), Visual Studio then does not display warnings. But I prefer the "sub-element" style as I find it more readable. 

    Also, it seems that this issue is strictly about RadDatePicker's "Calendar" and "DateInput" sub-elements. I do not observe that behavior with RadNumericTextBox's "NumberFormat" element, for example. I also confirm that this issue is not raised with the "ClientEvents" sub-element of several Telerik controls.

    The fact that this issue is not consistent across all Telerik control declarative sub-elements seems to point to an issue on the Telerik side. I do not agree to pointing fingers at Microsoft Intellisense engine, like the previous post on this thread seems to suggest.

    What does Telerik intend to do to resolve this major designer annoyance ?

    Thanks
    Marc-Andre
  17. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 22 Jun 2012 Link to this post

    Hi Marc-Andre,

    The difference between RadNumericTextBox's "NumberFormat" and RadDatePicker's DateInput is that the NumberFormat is just a class with public properties for settings, and the DateInput is actually instance of RadDateInput web control.

    The designer consider this wrongly as a web control declaration and tells you to place the "runat" attribute.

    We did lot of research on this problem with the designer, and we are unable to find possible solution. It is just something that MS have to fix.

    On side we can wrap all the settings from RadDateInput inside a class let say "DateInputSettingsClass" and then to make the DateInput to be such type of property. However this way we will loose the ability to access the input directly. And also copying the settings from this class to the actual DateInput object will be time consuming. It is not warranted to make the control slower just to hide warning that is actually bug in the designer.

    All the best,
    Vasil
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  18. DuelingCats
    DuelingCats avatar
    49 posts
    Member since:
    Jul 2012

    Posted 04 Mar 2013 Link to this post

    I also wanted to add another report of this. I am using VS 2012 with asp.net ajax 2013.Q1 controls release. See screenshot attached for the code sample. 

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017