For some reason, I cannot force the validator to raise the flag if something is wrong.
<asp:DropDownList ID="ddlTypeList" runat="server" DataSourceID="ods_TypeOptions" DataTextField="name" DataValueField="id" SelectedValue='<%# Bind("Type") %>' AppendDataBoundItems="true">
<asp:ListItem Text="-" Value="-1" Selected="True"></asp:ListItem> </asp:DropDownList>
The drop-down list has nice meanings, including the original layout.
Neither
<asp:RequiredFieldValidator ID="rfw" runat="server" ControlToValidate="ddlTypeList" InitialValue="-1" ToolTip="Required">*</asp:RequiredFieldValidator>
Nor
<asp:CompareValidator ID="cv" runat="server" ControlToValidate="ddlTypeList" ValueToCompare="-1" Operator="NotEqual" ToolTip="Required">*</asp:CompareValidator>
Raises any flags to say: "hey, you messed up, go fix it." For all google, searches, reviews, waving big hammers, I still have to figure out what I'm doing wrong.
I just want one solution to fix them all.
Oh yes, I also had ValidationGroup="myGroup" between DDL, RFV / CV and the button. Bad luck.
source share