Solved

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

Posted on 2007-03-29
3
431 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

759 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now