D
daokfella
I have a composite control that contains a texbox and comparevalidator
(and other stuff not applicable to this post). Right now, it does a
simple DataTypeCheck or any comparison to the ValueToCompare property.
I've exposed the ValueToCompare and the CompareOperator properties.
The control is for a date, so the Type property is permanently set as
Date.
I'd like to expose the ControlToCompare property, but it won't work
because I'll always get the "Cannot find the control referenced by the
ControlToCompare property (paraphrased)". I'm assuming this is because
the two compared controls are in different INamingContainers.
Has anybody found a workaround? I'd like for my custom controls to be
able to be compared against each other. My short term workaround is
allowing for the internal compare operator to be disabled, and then
just using new comparevalidators on the page between the two controls.
Also, when setting the ValidationCompare attribute in my custom
control, this control id is shown in the dropdown for another's
ControlToCompare property. Unfortunately, this is the id of the top
level <span> container and not the textbox within the
compositecontrol. I thought that was the problem, but even after
exposing the textbox ClientId and using that as the ControlToCompare,
it still didn't work.
Thanks,
Jason
(and other stuff not applicable to this post). Right now, it does a
simple DataTypeCheck or any comparison to the ValueToCompare property.
I've exposed the ValueToCompare and the CompareOperator properties.
The control is for a date, so the Type property is permanently set as
Date.
I'd like to expose the ControlToCompare property, but it won't work
because I'll always get the "Cannot find the control referenced by the
ControlToCompare property (paraphrased)". I'm assuming this is because
the two compared controls are in different INamingContainers.
Has anybody found a workaround? I'd like for my custom controls to be
able to be compared against each other. My short term workaround is
allowing for the internal compare operator to be disabled, and then
just using new comparevalidators on the page between the two controls.
Also, when setting the ValidationCompare attribute in my custom
control, this control id is shown in the dropdown for another's
ControlToCompare property. Unfortunately, this is the id of the top
level <span> container and not the textbox within the
compositecontrol. I thought that was the problem, but even after
exposing the textbox ClientId and using that as the ControlToCompare,
it still didn't work.
Thanks,
Jason