How to get alert message before redirect a page

前端 未结 7 1199
面向向阳花
面向向阳花 2020-12-25 07:49

I\'m using vs 2010. I need to display the message to user and redirect the page.

I use the below line.

ScriptManager.RegisterStartupScript(this, this         


        
7条回答
  •  有刺的猬
    2020-12-25 08:30

    Your Asking for a redirect page, below is an example of a redirect:

       string page = "Login.aspx";
            string myStringVariable = "Password Update!";
            ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable + "');Response.Redirect('"+ page +"' );", true);
    

提交回复
热议问题