G
Guest
I have a very strange problem involving controls and the CustomValidator.
We have created a custom control. The control includes an ordinary textbox,
a customvalidator with the ControlToValidate set to the textbox, and a
VBScript validator subroutine. The purpose of the sub is to insure that only
dates that fall on Monday are permitted. The custom validator is exposed
through a property to permit enabling and disabling as needed.
The problem is this. If I have two instances of the control on a page, the
custom validator of the first instance is apparently calling the sub of the
second. The net effect is that I cannot properly validate Mondays on the
first control. This control seems to work fine when there is only one
instance on a page. When I examine the HTML source, it appears that there
are the correct instances of the code, each accessing the correct controls.
(I should admit upfront that the control also contains a ThirdParty calendar
date selector, Telerik, but as far as I can tell, none of the problem code
interacts with it in any way. It's sole purpose is to put a property
formatted date string into the textbox.)
We have created a custom control. The control includes an ordinary textbox,
a customvalidator with the ControlToValidate set to the textbox, and a
VBScript validator subroutine. The purpose of the sub is to insure that only
dates that fall on Monday are permitted. The custom validator is exposed
through a property to permit enabling and disabling as needed.
The problem is this. If I have two instances of the control on a page, the
custom validator of the first instance is apparently calling the sub of the
second. The net effect is that I cannot properly validate Mondays on the
first control. This control seems to work fine when there is only one
instance on a page. When I examine the HTML source, it appears that there
are the correct instances of the code, each accessing the correct controls.
(I should admit upfront that the control also contains a ThirdParty calendar
date selector, Telerik, but as far as I can tell, none of the problem code
interacts with it in any way. It's sole purpose is to put a property
formatted date string into the textbox.)