i m using an alert box on click of the button and after alert box i am redirecting it to the other page.
the page is getting redirected without displaying the alert box.
please also tell how to use message box in asp.net c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Default6 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnAlert_Click(object sender, EventArgs e)
{
/*btnAlert.Attributes.Add("onclick", "javascript:alert('Invalid');");*/
Response.Write("<script>alert('New Password is created')</script>");
// Response.Redirect("web3.aspx");
}
}
please reply