Here is the sample code to validate Email field from asp.net dropdownlist box. Javascript as:
<script language="javascript" type="text/javascript">
function validateDropList()
{
if(document.getElementById("<%=drop1.SelectedIndex %>").value=="")
{
alert("Email id can not be blank");
document.getElementById("<%=drop1.SelectedIndex %>").focus();
return false;
}
}
</script>
User Interface code as:
<asp:dropdownlist id="drop1" runat="server" xmlns:asp="#unknown">
...
</asp:dropdownlist>
Code behind as:
drop1.Attributes.Add("onselectedindexchanged", "return validateDropList()")
Hope, it clarifies.