i have 20 checkboxes in usercontrol ... i wanna do whole coding in user control ...
how to show msg box if user forgot to check asp.net checkbox control on button click .. ?
i have 20 checkboxes in usercontrol ... i wanna do whole coding in user control ...
how to show msg box if user forgot to check asp.net checkbox control on button click .. ?
You should provide a CustomValidator for every Checkbox which validates on client- and serverside if the Checkbox is checked. http://www.joe-stevens.com/2009/08/12/using-the-customvalidators-clientvalidationfunction/
Create a public method on the user control that returns a boolean indicating if the data entry in the control is correct. Call that method from your page on the button click event. If data entry is valid, continue processing;else show an error message.