In WebCombo, you can implement WebCombo and Required Validator in Web User Control.
This topic will show you how to perform the scenario above.
To implement WebCombo and Required Validator in Web User Control
- Create a new Web User Control and leave the name as it is.
- Drag WebCombo control from the toolbox to the web user control.
- Fill the WebCombo with unbound data.
- Drag a RequiredFieldValidator control from the toolbox to the right side of the WebCombo's instance.
- Set its ControlToValidate to WebCombo1.
- Create a new WebForm and named it as WebUserControlHost.aspx.
- Drag the WebUserControl1.ascx from the Solution Explorer to the WebForm page.
- Run the project.