Click here to Skip to main content
15,896,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I want when user click on save button then Message Box should open "Your Data has been Saved." and then It go to next page.I'm try do(see below) code.

ScriptManager.RegisterStartupScript(this, GetType(), "alert", "alert('Your Data has been Saved.');", true);
Response.Redirect("UserLogin.aspx");

but it is not sowing message it just go to next page. In asp.net(C#)3.5
help me.
Posted

Hi you! :)
You write the following code:
Respone.Write("alert('Your Data has been Saved!')");
Response.Redirect("UserLogin.aspx");
;) ;)
 
Share this answer
 
Do the following

page_Load(..)
{
if(!ispostback )
{
button.attributes.add("onclick","alert('i am moving');");
}
}

& in button event write moving code

button_Click(...)
{
Response.Redirect("abc.aspx");
}
 
Share this 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