General Fear
Member
- Joined
- Dec 22, 2012
- Messages
- 12
- Programming Experience
- 10+
I am using VB.Net 2010.
At our firm we have several textboxes. We have the typical white background with black letters. Then if it is a mandatory textbox, it is a yellow background with black letters. Then there is letters only textbox, followed by numbers only, then there are combinations of the above like mandatory letters only textbox and so on and so on . . .
Instead of creating a textbox for each occasion, I was wondering if I can have one textbox. I want to pass a parameter to the textbox. Then I would like to have a case statement inside that basically says, case 0 basic textbox case 1 letters only textbox case 2 numbers only etc etc . . .
Can I do this with custom controls? If so, how can I implement this. Or is there a better way?
At our firm we have several textboxes. We have the typical white background with black letters. Then if it is a mandatory textbox, it is a yellow background with black letters. Then there is letters only textbox, followed by numbers only, then there are combinations of the above like mandatory letters only textbox and so on and so on . . .
Instead of creating a textbox for each occasion, I was wondering if I can have one textbox. I want to pass a parameter to the textbox. Then I would like to have a case statement inside that basically says, case 0 basic textbox case 1 letters only textbox case 2 numbers only etc etc . . .
Can I do this with custom controls? If so, how can I implement this. Or is there a better way?