The below code snippet will validate that the ddlName dropdownList has value or not, if their is no selected value then alert message will be popped up saying Please Select Name
function validate() {
var ddlName = document.getElementById("<%=ddlName.ClientID%>");
if (ddlName.value == "0") {
alert("Please Select Name!");
ddlName.focus();
return false;
}
Thanks
Amatya