开发者

problems with calendar extender controller in asp .net

开发者 https://www.devze.com 2023-01-20 09:09 出处:网络
i am开发者_StackOverflow社区 using a calendar extendercontrol in my asp.net web application. i want to disable this control while clicking ona check box. i used disabled property of calendar extender.

i am开发者_StackOverflow社区 using a calendar 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 calendar extender. i set disabled =true . but i have 2 problems.

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

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

i hope someone help me


  • 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


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?

0

精彩评论

暂无评论...
验证码 换一张
取 消