1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| protected void Page_Load(object sender, EventArgs e)
{
String a = null;
if (Request.QueryString["id"] != null)
{
a = Request.QueryString["id"].ToString();
string message = "Etes vous certain(e) de vouloir entrer sur la page " + a + " ?";
string scripty = "var r = confirm('{0}','confirmMsg')";
Page.ClientScript.RegisterClientScriptBlock(GetType(), DateTime.Now.ToString(), String.Format(scripty, message), true);
if (Page.IsPostBack)
{
if (Request.Form["confirmMsg"] == "1")
{
Response.Write("<script>alert(Vous allez entrer..')</script>");
}
else if (Request.Form["ConfirmMsg"] == "0")
{
Response.Write("<script>alert('Entrée annulée!')</script>");
} |
Partager