I've been reading some topics from StackOverFlow
and I found some ways to refresh the page like:
Response.Redirect(Request.RawURL);, Response.Redirect(Absolute.Uri) etc...
But I need to send an alert of confirmation and ALSO refreshes the page... Now, I'm using this method to send the alert:
ScriptManager.RegisterStartupScript(this, typeof(Page), "alert", "alert('Well Done !');", true);
But using any of these methods to refreshes the page, the alert isn't fired. So I need to know a method that is a good practice to do this.
Because I have some DropDownList
with data from database
and I'm making some Edits
on the data, so when the user clicks on the button to edit
the current data, it shows up a message like edit successfully
then refreshes the page with the new data.
How about client redirect?
Since alert() is synchronous function, redirect will fire only when user click "ok"
The above client script can be added in your codebehind this way.