Show Alert Box and Redirect to Another Page

Some times, after submitting a form it is necessary to show an alert and redirect to some page is necessary

This can be achieved by using below script :

ClientScript.RegisterStartupScript(typeof(Page), “MessagePopUp”, “alert(‘DATA SAVED SUCCESFULLY’); window.location.href = ‘/Project/Homepage.aspx’;”, true);

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s