Hi Narasiman,
To validate the dropdownlist selection property you can use this function
protected void ValidateDDL(DropDownList ddl)
{
if (ddl.SelectedIndex == -1)
{
}
}
Function Call:
ValidateDDL(Dropdownlist1);
ValidateDDL(Dropdownlist2);
ValidateDDL(Dropdownlist3);
Same can also validate using Javascript, it depends on you...
function validate()
{
if(document.getElementById("ddlList").value == "")
{
alert("Please select value");
document.getElementById("ddlList").focus();
return false;
}
}
Hope this helps you a bit.
Regards,
RK