Click here to Skip to main content
15,890,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi I use these scripts for showing error msg.Scripts call proprly but msg not show in any browser..
here is scripts..

C#
ClientScript.RegisterStartupScript(Page.GetType(), "fghh", "alert('Check Min% data, Min1% + Min2% + Min3% + Min4%  has to be equal to 100.');", true);

 ScriptManager.RegisterStartupScript(txt_Min4_Per, Page.GetType(), "", "alert('Check Min% data, Min1% + Min2% + Min3% + Min4%  has to be equal to 100.');", true);

how to solve this....
Posted
Updated 25-Oct-13 21:56pm
v2
Comments
Ashwani Gusain 26-Oct-13 5:21am    
i think u are trying to pass some values in that alert box? is this right.

try this
C#
ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "alert('Your Massage');", true);
 
Share this answer
 
Comments
ErBhati 26-Oct-13 3:52am    
thanks for your answer but its not working..for me...
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "VariableRegisteration", strScript, true);

use this if ur validation inside update panel
 
Share this answer
 
Try this

C#
ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "alert('Message');", true);
 
Share this answer
 
v2

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



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