|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
RequiredFieldValidator + CheckBox ?
<i><b>Originally posted by : Simon (simon.stafford@peakhour.com.au)</b></i><br />Is it possible to use a RequiredFieldValidator to validate a CheckBox there-by making the checking of it mandatory for submission of the form?<br /><br />I've tried adding a RequiredFieldValidator for the checkbox and all i get is an error message: Control 'deleteDisclaimerCheckbox' referenced by the ControlToValidate property of 'deleteDisclaimerValidator' cannot be validated.<br /><br />Here's the code snippet...<br /><br /><asp:CheckBox ID="deleteDisclaimerCheckbox" runat="server" /><br /><asp:RequiredFieldValidator ID="deleteDisclaimerValidator" ControlToValidate="deleteDisclaimerCheckbox"<br />Runat="server" /><br /><br />
|
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : </b></i><br />the value of A checkbox is "TRUE" when it is checked or "FALSE" when it is unchecked. So why you need to use a requiredfieldvalidator to validate it?<br /><br /><br />------------<br />Simon at 3/13/2002 6:57:04 PM<br /><br />Is it possible to use a RequiredFieldValidator to validate a CheckBox there-by making the checking of it mandatory for submission of the form?<br /><br />I've tried adding a RequiredFieldValidator for the checkbox and all i get is an error message: Control 'deleteDisclaimerCheckbox' referenced by the ControlToValidate property of 'deleteDisclaimerValidator' cannot be validated.<br /><br />Here's the code snippet...<br /><br /><asp:CheckBox ID="deleteDisclaimerCheckbox" runat="server" /><br /><asp:RequiredFieldValidator ID="deleteDisclaimerValidator" ControlToValidate="deleteDisclaimerCheckbox"<br />Runat="server" /><br /><br />
|
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > RequiredFieldValidator + CheckBox ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|