D
D. Shane Fowlkes
This may be a very simple question but I'm stumped none the less.
I have a form where a user provides comments. There's a Grid below this
form which displays all comments in the table so far. On the Page_Load sub,
this grid is loaded. When they submit the form, a SaveComments Sub will
insert the record into a table and then disable the button and textbox
(greyed out) and display a message in a asp:label saying "thank you...".
The last step of the SaveComments Sub is to reload the Grid which will show
the user's newly provided comments to the list of other comments.
Simple enough.
The button is disabled so they can't submit comments a second time during
that session. But I've discovered that if you refresh/reload the page,
it'll run the Sub all over again....inserting another record each time you
reload the page and the duplicates start appearing in the Grid. D'oh!!
So how can I easily prevent this? The only solution I can come up with is to
redirect them to another confirmation page. Not what I was hoping for.....
I'm using VB as the base code.
I have a form where a user provides comments. There's a Grid below this
form which displays all comments in the table so far. On the Page_Load sub,
this grid is loaded. When they submit the form, a SaveComments Sub will
insert the record into a table and then disable the button and textbox
(greyed out) and display a message in a asp:label saying "thank you...".
The last step of the SaveComments Sub is to reload the Grid which will show
the user's newly provided comments to the list of other comments.
Simple enough.
The button is disabled so they can't submit comments a second time during
that session. But I've discovered that if you refresh/reload the page,
it'll run the Sub all over again....inserting another record each time you
reload the page and the duplicates start appearing in the Grid. D'oh!!
So how can I easily prevent this? The only solution I can come up with is to
redirect them to another confirmation page. Not what I was hoping for.....
I'm using VB as the base code.