Solved

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

Posted on 2007-03-29
3
445 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

724 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