Click here to Skip to main content
15,884,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have tried all of the combinations:
//MessageBox.Show("Email address saved.");
ScriptManager.RegisterStartupScript(this, GetType(), "showAlert", "alert('Email address saved.');", true);
//ScriptManager.RegisterStartupScript(this, GetType(), "displayalertmessage", "Showalert();", true);
//ScriptManager.RegisterStartupScript(this, this.GetType(), "showalert", "alert('Email address saved.');", true);
//this.Page.ClientScript.RegisterStartupScript(this.GetType(), Guid.NewGuid().ToString() , "alert('Email address saved.');__doPostBack('__Page', 'EmptyPostback');", true);
//Page.ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('Email address saved.');", true);
Posted
Comments
Sinisa Hajnal 25-Sep-14 6:27am    
Change your title to something shorter and include full text in the question, this way it stops before we can read everything.

My guess would be that there is an error in your script and that it prevents loading of CSS. Try registering ClientScript.RegisterClientScriptBlock instead of startup.

Try response.Write ("<script type='javascript'>alert('Email saved!');</script>");

1 solution

this.ClientScript.RegisterClientScriptBlock(this.GetType(), this.ClientID + "_JS_Error", "alert('Email saved!')");

Try like this
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900