RequiredFieldValidator验证下拉列表框
<asp:DropDownList ID="DropDownList1" runat="server" CssClass="style01">
<asp:ListItem Text="请选择" Value=""></asp:ListItem>
</asp:DropDownList>
<asp:Label ID="Label10" runat="server" Text="*" ForeColor="Red" Font-Size="Smaller"></asp:Label>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="DropDownList1" InitialValue="" ErrorMessage="请选择信息" Font-Size="Smaller" ForeColor="Red"></asp:RequiredFieldValidator>
<asp:ListItem Text="请选择" Value=""></asp:ListItem>
</asp:DropDownList>
<asp:Label ID="Label10" runat="server" Text="*" ForeColor="Red" Font-Size="Smaller"></asp:Label>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="DropDownList1" InitialValue="" ErrorMessage="请选择信息" Font-Size="Smaller" ForeColor="Red"></asp:RequiredFieldValidator>