[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 350
  • Last Modified:

Custom Required TextBox Control

I am wanting to make a custom control that combines the TextBox web control with a required field validator. I remember seeing this tutorial on the web before. Does anyone know a link to the tutorial? If not, I have set the points high if anyone wants to post a few pointers.

Basically I am looking for

<myControl:RequiredTextBox /> This would be all functionality of a textbox combined with the functionality of the requiredfieldvalidator for THIS specific field.

Thanks much,
2 Solutions
i have done this .. i build a custom web control by inherited from textbox .. it has a boolean property called "Mandatory" which the user can set .. if set to true, then i add a required validator and attach it to this textbox .. i also use a summary validator to show the error as a messagebox .. i also have other properties using which the user can configure the error message etc ..

clickclickbangAuthor Commented:
Thanks for the links and idea...

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now