eramgarden
Contributor
- Joined
- Mar 8, 2004
- Messages
- 579
I have a dropdownbox and a textbox.
If user enters something in the textbox BUT doesnt choose anything from the ddl, then i enable the validator in code behind...
This is what I have:
In Code Behind, i have :
The value of NOT rvfActType.IsValid is False, so it should go down to Exit Sub but it doesnt!!!
Spent hours on this..what am i missing?
If user enters something in the textbox BUT doesnt choose anything from the ddl, then i enable the validator in code behind...
This is what I have:
Code:
<asp:RequiredFieldValidator id="rvfActType" runat="server" [b]Enabled="False"[/b] InitialValue="---" Display="Dynamic" ControlToValidate="ddlActType22" ErrorMessage="RequiredFieldValidator">Required! </asp:RequiredFieldValidator>
In Code Behind, i have :
Code:
rvfActType.Enabled = True
rvfActType.Validate()
[b] If Not rvfActType.IsValid Then [/b]
Exit Sub
End If
The value of NOT rvfActType.IsValid is False, so it should go down to Exit Sub but it doesnt!!!
Spent hours on this..what am i missing?