Dear Experts,
My Alert message doesn't work with Update Panel.
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="Button3" Text="Show Message" runat="server" OnClick="btnRedirect_Click" /></ContentTemplate></asp:UpdatePanel> </form> </body> </html
protected void btnRedirect_Click(object sender, EventArgs e)
{
string message = "You will now be redirected to ASPSnippets Home Page.";
string url = "http://www.aspsnippets.com/";
string script = "window.onload = function(){ alert('";
script += message;
script += "');";
script += "window.location = '";
script += url;
script += "'; }";
ClientScript.RegisterStartupScript(this.GetType(), "Redirect", script, true);
}