BILL ASBY

BILL ASBY

  • NA
  • 2
  • 0

How do I Override MaxLength property of custom textbox control

Mar 6 2009 12:39 PM

I found a cool custom Currency Textbox control on this site. http://www.vbdotnetheaven.com/UploadFile/scottlysle/CurrencyControl_VB03242007121927PM/CurrencyControl_VB.aspx

The only issue that I have is it uses the base class Textbox MaxLength property - default textbox. In the applications we are using, we would never have a Currency value greater than 1000000.00. My current workaround is to set the MaxLength property of this custom control to 10.

I was wondering if there is a way to Override the MaxLength property for this custom control so that it does NOT allow a value greater than 10. I expect that this would need to be checked at design time - not runtime.

I have no idea how to go about this and appreciate any suggestions.

 


Answers (1)