I have a page tha contains a datagrid and some textboxes. When the user clicks the ADD button, i need to insert the textbox data into a table and then refresh the datagrid data. Ok, but if my user clicks the browser’s refresh button the ASP.NET fires


When the user hits the refresh button they are typically prompted by the
browser. The prompt informs them that if they click ‘yes’ (or is it ‘ok’?)
that what the browser will do is execute the last thing the user did to get
the page. If the past thing the user did was click the Add button, then that’s
what it will do. Unfortunately this is a user education issue.

There are some things you can do to remove this possibility, such as a Response.Redirect
back into the same page so that it reloads itself from scratch without the
POST sideeffects, but since you’re dynamically adding controls in the postback
I think you’re going to have a hard time.

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