views:

15

answers:

2

i am using a calender extender control in my asp.net web application. i want to disable this control while clicking on a check box. i used disabled property of calender extender. i set disabled =true . but i have 2 problems.

  1. it do not desabling the textbox associated with calender extender control

  2. i am using a regular expression validator to validate the date. if calender extender is disabled then the regular expression validator always fails. (i assume the regular expression validator cant read the date when the calender extender control is disabled)

i hope someone help me

+1  A: 

Hi Shameer,

  • Instead of regular expression validator, use compare validator, set the operator to datatypecheck and datatype to date that will help
  • Disable the textbox along with the calender

Hope this will help

lakhlaniprashant.blogspot.com
A: 

Why not disabling the Textbox, the Validator(use CompareValidator with datatype=Date) and the Extender in the CheckedChanged Event handler of the Checkbox on serverside?

Tim Schmelter