Hi
you can use this script for getting confirmation from the user
function ConfirmSave()
{
var Ok = confirm('Are you sure want to save the changes?');
if(Ok)
return true;
else
return false;
}
---------------------------------------//For redirection to the URL
function ConfirmCancel(URL)
{
var Ok = confirm('Are you sure want to Cancel the changes?');
if(Ok == true)
{
document.location.href=URL;
}
//else
//return false;
}
In server side you can add this line for adding attributes of onclick()
btnSave.Attributes["onclick"] = "javascript:return ConfirmSave();";
btnCancel.Attributes["onclick"] = "javascript:ConfirmCancel('InspectionNew.aspx');";
Thanks & regards
Dhinesh paramasivam