Hello,
You achieve your task using Custom validation using following way
Made ur logic as follows
<asp:DropDownList ID="drpInner" runat="server">
<asp:ListItem Text="Select" Value="0"></asp:ListItem>
<asp:ListItem Text="A" Value="a"></asp:ListItem>
<asp:ListItem Text="B" Value="b"></asp:ListItem>
<asp:ListItem Text="C" Value="c"></asp:ListItem>
<asp:ListItem Text="D" Value="d"></asp:ListItem>
</asp:DropDownList>
<asp:CustomValidator ID="CustomValidator1" ControlToValidate="drpInner" ClientValidationFunction="ClientValidate"
Display="Static" ErrorMessage="Select at least one!"
ForeColor="green" Font-Name="verdana" Font-Size="10pt" runat="server" />
script type="text/javascript">
function ClientValidate(source, arguments) {
if (arguments.Value == '0')
arguments.IsValid = false;
else
arguments.IsValid = true;
}
</script>
Hope this helpful!
Thanks