0
I am using the Comparevalidator to check if the value selected in the dropdownlist is "Select", but this does not work, follow the code.
<asp:DropDownList ID="ddlIdPisSt" runat="server" DataSourceID="sdsIdPisSt" DataTextField="Descricao"  
    DataValueField="Id" AppendDataBoundItems="True" Width="790px">
    <asp:ListItem Value="">Selecione</asp:ListItem>
</asp:DropDownList>                 
<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="ddlIdPisSt" Display="Dynamic" 
    ErrorMessage=" * " Operator="NotEqual" ValueToCompare="" ForeColor = "Red">
</asp:CompareValidator>
What I’m doing wrong. Can someone help me.
Thanks to the tip, Rboschini, to use the Requiredvalidator, just add the property Initialvalue=" " that solved my problem. Thanks.
– krispim
Give me a wire and I’ll score! ;) Please!!! : D
– RBoschini
+1 I gave a joinha only on account of his begging. hahahaa Excellent btw response
– StillBuggin
virtual begging, just do not pass the agency and account for shame even. :p
– RBoschini