function ConfirmAbsent(ddlPresence) { if (ddlPresence != null) { var myValue = ddlPresence.options[ddlPresence.selectedIndex].text; var blnAbsent = confirm("This will mark as "+ myValue +". Please confirm clicking OK."); if (blnAbsent) { return true; } else { return false; } } }
ddlUserPresence.Attributes.Add("onchange", "if (!ConfirmAbsent(" + ddlUserPresence.ClientID + ")) return; else __doPostBack('" + ddlUserPresence.UniqueID + "', '');");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)