A
ad
We must do with Javascirpt when develop web UI.
I write a alert function which can call from server side like:
public static void alert(Page myPage, string sMsg)
{
string myScritpt;
myScritpt = "<script> window.alert('"+sMsg+"');</script>";
myPage.RegisterStartupScript("", myScritpt);
}
I can call the alert function like:
alert (this, "my message");
I want to wrte a confirm as alert do, so I can call the confirm function
like:
if (confirm("Are you sure"))
{
.......
}
How can I write the confirm function?
I write a alert function which can call from server side like:
public static void alert(Page myPage, string sMsg)
{
string myScritpt;
myScritpt = "<script> window.alert('"+sMsg+"');</script>";
myPage.RegisterStartupScript("", myScritpt);
}
I can call the alert function like:
alert (this, "my message");
I want to wrte a confirm as alert do, so I can call the confirm function
like:
if (confirm("Are you sure"))
{
.......
}
How can I write the confirm function?