C
Craig Jewiss via .NET 247
Hi
I've created a custom control with two textboxes and fourvalidators (one regular expression, one range, two required). I've overridden the CssClass property to apply a CssClass to thetwo textboxes only. If I apply the CssClass value in the codebehind, it works fine, although it appears to be applying theCssClass to the validators as well. If I enter it directly inthe properties window, it causes the control to switch to "ErrorCreating Control" and shows "Ambiguous match found" as theerror. I can get round this problem by not overriding theCssClass property and creating a new property (e.g. MyCssClass),but I'm not the only user of this control, so I'd like it toconform with other standard controls by using the CssClassproperty. I've also got the same propblem with overriding theEnabled property.
I suspect I'm approaching this requirement from the wrong angle,so any help is much appreciated.
I've created a custom control with two textboxes and fourvalidators (one regular expression, one range, two required). I've overridden the CssClass property to apply a CssClass to thetwo textboxes only. If I apply the CssClass value in the codebehind, it works fine, although it appears to be applying theCssClass to the validators as well. If I enter it directly inthe properties window, it causes the control to switch to "ErrorCreating Control" and shows "Ambiguous match found" as theerror. I can get round this problem by not overriding theCssClass property and creating a new property (e.g. MyCssClass),but I'm not the only user of this control, so I'd like it toconform with other standard controls by using the CssClassproperty. I've also got the same propblem with overriding theEnabled property.
I suspect I'm approaching this requirement from the wrong angle,so any help is much appreciated.