public void Confirm(string message) { _Content = "<input type=\"hidden\" value=\"0\" name=\"" + ID + "_result\" />" + Environment.NewLine + "<script type=\"text/javascript\">" + Environment.NewLine + " if (confirm('" + ServerJScript.JSEncode(message) + "')) {" + Environment.NewLine + " document.forms[0]." + ID + "_result.value='" + WebMessageBoxResult.Ok + "'; }" + Environment.NewLine + " else {" + Environment.NewLine + " document.forms[0]." + ID + "_result.value='" + WebMessageBoxResult.Cancel + "'; }" + Environment.NewLine + " document.forms[0].submit(); " + Environment.NewLine + "</script>"; }
public void Alert(string message) { _Content = "<script type=\"text/javascript\">alert('" + ServerJScript.JSEncode(message) + "');</script>"; }