//Open A Alert box.
ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", @"alert('Invalid Login Email & Password.');", true);
//Open a Alert Box then press "Ok" which redirect the Page.
ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "alert('valid Login Email & Password.'); window.location.href = 'HomeAdmin.aspx';", true);
//Open a New Asp page in new Window
ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "window.open(\"Default3.aspx\")", true);
//Open a New website in new Window
ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "window.open('http://www.google.com')", true);
//Constant width and height of the new Window and not resize.
string fullURL = "window.open('http://www.google.com', '_blank', 'height=500,width=800');";
ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", fullURL, true);
No comments:
Post a Comment