function validdate(obj1,obj2,obj3) { if((document.getElementById(obj1).value=="Day")&&(document.getElementById(obj2).value=="Month")&&((document.getElementById(obj3).value=="Year"))) { document.getElementById('<%=ltmsg.ClientID%>').innerText='Date is mandatory.'; } else if((document.getElementById(obj1).value=="Day")&&(document.getElementById(obj2).value=="Month")) { document.getElementById('<%=ltmsg.ClientID%>').innerText='Date is mandatory.'; } else if(document.getElementById(obj1).value=="Day") { document.getElementById('<%=ltmsg.ClientID%>').innerText='Date is mandatory.'; } else if(document.getElementById(obj2).value=="Month") { document.getElementById('<%=ltmsg.ClientID%>').innerText='Month is mandatory.'; } else if(document.getElementById(obj3).value=="Year") { document.getElementById('<%=ltmsg.ClientID%>').innerText='Year is mandatory.'; } else { document.getElementById('<%=ltmsg.ClientID%>').innerText=''; } }
ddl_day.Attributes.Add("onchange", "javascript:validdate('" + ddl_day.ClientID + "','" + ddl_month.ClientID + "','" + ddl_year.ClientID + "');"); ddl_month.Attributes.Add("onchange", "javascript:validdate('" + ddl_day.ClientID + "','" + ddl_month.ClientID + "','" + ddl_year.ClientID + "');"); ddl_year.Attributes.Add("onchange", "javascript:validdate('" + ddl_day.ClientID + "','" + ddl_month.ClientID + "','" + ddl_year.ClientID + "');");