I have a routine to handle enter key as save. However if the user enters an invalid date and hits enter i do not want the save functionality to be implemented. My Page.IsValid is returned true if the date entered is an invalid date.
is there a workaround for this?
below is the code for my enter key routine:
is there a workaround for this?
below is the code for my enter key routine:
function
HandleEnterAsSave(sender, eventArgs) {
if (eventArgs.get_domEvent().keyCode == 13) {
//__doPostBack("btnSave", "Save");
var saveButton = document.getElementById('<%= btnSave.ClientID %>');
saveButton.click();
}
}