Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I use this
XML
Response.Write("<script>alert(successful!')</script>");

to reload webpage, but it has caused a problem that the table has became smaller than first load.
I don't know why.

Please give me some advice.
Posted
Updated 2-Nov-10 22:39pm
v2
Comments
AngelLoose 3-Nov-10 4:11am    
if I want judge textbox whether empty which one is better ,ScriptManager.RegisterStartupScript or Response.Write
AngelLoose 3-Nov-10 4:12am    
while,I want refresh page
Dalek Dave 3-Nov-10 4:39am    
Edited for Grammar and Syntax.

1 solution

use this

ScriptManager.RegisterStartupScript(Page, this.GetType(), "alert", string.Format("alert('successful!');"), true);
 
Share this answer
 
Comments
AngelLoose 3-Nov-10 4:00am    
can you tell me the difference of the two??
AngelLoose 3-Nov-10 4:05am    
thanks!
Dalek Dave 3-Nov-10 4:39am    
Good Answer.

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