i was comparing from date and to date in java script if the value is false i am returning false but the program is executing.
my java script code
function Noofdays() {
var total= document.getElementById('ctl00_MainContent_Txtabc');
var days = document.getElementById('ctl00_MainContent_ddldays');
if (total= days) {
alert("same");
return true;
}
else {
alert("not same");
return false;
}
}
i was calling this function from c# code in save button,
ScriptManager.RegisterStartupScript(this, GetType(), "FromDateSample", "Noofdays();", true);
and i had a on client click event in save button.