G
Green
Hi,
I have the following method in the WebUI class as following:
public void Confirm(System.Web.UI.Page parentObject,string message){
StringBuilder sb = new StringBuilder();
sb.Append("<script language=Javascript >");
sb.Append("confirm('"+message+"');");
sb.Append("</script>");
if(!parentObject.IsStartupScriptRegistered("ConfirmScript"))
parentObject.RegisterStartupScript("ConfirmScript",sb.ToString());
}
And in the code-behind of the aspx page in have:
WebUI ui = new WebUI();
ui.Alert(Page,"The document already exists.");
But it does not fire up(no alert pop up!)
Do you have any ideas?
Thx in advance.
I have the following method in the WebUI class as following:
public void Confirm(System.Web.UI.Page parentObject,string message){
StringBuilder sb = new StringBuilder();
sb.Append("<script language=Javascript >");
sb.Append("confirm('"+message+"');");
sb.Append("</script>");
if(!parentObject.IsStartupScriptRegistered("ConfirmScript"))
parentObject.RegisterStartupScript("ConfirmScript",sb.ToString());
}
And in the code-behind of the aspx page in have:
WebUI ui = new WebUI();
ui.Alert(Page,"The document already exists.");
But it does not fire up(no alert pop up!)
Do you have any ideas?
Thx in advance.