This is a migrated thread and some comments may be shown as answers.

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

16 Answers 412 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Charles Forsyth
Top achievements
Rank 2
Charles Forsyth asked on 24 Oct 2008, 09:02 PM
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.

 

 

16 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 28 Oct 2008, 08:32 AM
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.
0
Dan
Top achievements
Rank 1
answered on 17 Feb 2009, 08:26 PM
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



0
Matthew Bishop
Top achievements
Rank 1
answered on 18 Feb 2009, 04:12 AM
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.
0
John
Top achievements
Rank 1
answered on 29 Jul 2009, 06:29 PM
I have this issue with 2009.1.527.35.

<telerik:RadDatePicker ID="OwnerBirthDateRadDatePicker" runat="server" ShowPopupOnFocus="True" 
                                Culture="English (United States)">  
                                <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" /> 
                                <DateInput Width="" LabelCssClass="" DateFormat="d" /> 
                                <DatePopupButton CssClass="" ImageUrl="" HoverImageUrl="" ToolTip="Open the calendar popup." /> 
                            </telerik:RadDatePicker> 
0
Sebastian
Telerik team
answered on 30 Jul 2009, 08:02 AM
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.
0
John
Top achievements
Rank 1
answered on 30 Jul 2009, 01:55 PM
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.
0
Steven
Top achievements
Rank 1
answered on 27 Jun 2011, 07:20 PM
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?
0
Hus Damen
Top achievements
Rank 1
answered on 30 Jun 2011, 10:53 AM
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
0
Steven
Top achievements
Rank 1
answered on 30 Jun 2011, 02:31 PM
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.  
0
Erik
Top achievements
Rank 1
answered on 10 Feb 2012, 11:01 AM
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?
0
Veli
Telerik team
answered on 14 Feb 2012, 03:26 PM
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 >>
0
Chad
Top achievements
Rank 1
answered on 22 May 2012, 06:11 PM
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.
0
Vasil
Telerik team
answered on 24 May 2012, 01:38 PM
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.
0
Marc-André Turmel
Top achievements
Rank 1
answered on 22 Jun 2012, 01:37 PM
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
0
Vasil
Telerik team
answered on 22 Jun 2012, 03:29 PM
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.
0
DuelingCats
Top achievements
Rank 2
answered on 04 Mar 2013, 10:10 PM
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. 

Tags
Calendar
Asked by
Charles Forsyth
Top achievements
Rank 2
Answers by
Sebastian
Telerik team
Dan
Top achievements
Rank 1
Matthew Bishop
Top achievements
Rank 1
John
Top achievements
Rank 1
Steven
Top achievements
Rank 1
Hus Damen
Top achievements
Rank 1
Erik
Top achievements
Rank 1
Veli
Telerik team
Chad
Top achievements
Rank 1
Vasil
Telerik team
Marc-André Turmel
Top achievements
Rank 1
DuelingCats
Top achievements
Rank 2
Share this question
or