Click here to Skip to main content
15,886,640 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dears,

i have the following script where i want to alert a message and redirect
ScriptManager.RegisterStartupScript(this, this.GetType(), "alert","alert('Save Complete'); window.location='AddMerchant.aspx';", false);


The problem is that when i click back on the IE browser button the alert message is displayed again.
how can i avoid the popup message to appear again?

Regards,
Posted
Updated 14-Jan-13 10:12am
v2

1 solution

A startup script is always going to run on startup.

Try RegisterClientScript, but you have to call the function in the script
 
Share this answer
 
Comments
Sandra Ha 15-Jan-13 5:24am    
RegisterClientScript didn't solve the problem
jkirkerx 15-Jan-13 12:46pm    
You probably have to change the script

ScriptManager.RegisterStartupScript(this, this.GetType(), "scriptName.js","fire_alert('Save Complete');

function fire_alert(message) {
alert(message);
}

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