Solved

ASP.NET FREE DATE PICKER CONTROL PROBLEM - "ControlToValidate" property error

Posted on 2007-03-29
3
437 Views
Last Modified: 2013-11-26
Hi

I downloaded this free asp.net date picker control from http://www.eclipsewebsolutions.com.au/Products/DatePickerControl/tabid/56/Default.aspx

Takes 2 mins to use, however when I use their example with a required field validator I get the following error...

"....Control 'DatePicker1' referenced by the ControlToValidate property of 'RequiredFieldValidator1' cannot be validated....."

Could somebody download the control and see if they get the same error?  
0
Comment
Question by:mugsey
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
mrichmon earned 500 total points
ID: 18817106
This will guaratneed happen looking at their source code.

They have two inputs generated and both withing a naming container.  this means that the id of the input is not the id you assign to the id of the control.

Instead the id of the input looks like:
id="dnn_ctr373_XSSmartModule_ctl00_DatePicker1_txtDate"

You could look in your code to see the actual id and send that into the required field validator to get it to work...

Otherwise I don't think this is the best written control for that situation...
0
 

Author Comment

by:mugsey
ID: 18817126
OK Thanks!  Is there a freebie you could recommend?  
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 18817159
We don't use one that is a pre-wrapped .NET control.  We wrote our own...

Just a javascript date picker added to an asp:textbox works great - then you can use the required field validators, range validaators, type validators, etc all tied to the asp:textbox

Here is one:
http://www.nsftools.com/tips/DatePickerTest.htm
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question