Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a web-part that includes a simple web-form. After submitting the web-form the user will receive an apropiate succes/error message.

In the codeBehind for the Click_event of the submit button I have:

lblMessage.Text = "Your Profile Details were updated successfully";

And code in the asxc file:

<asp:Label ID="lblMessage" runat="server" Text=""></asp:Label>

The problem is that message don't disappear after page refresh F5.

Any ideas?

share|improve this question

1 Answer 1

The problem is that F5 isn't reload page, but replay last request. So pressing F5 will post the previous content once more.

Instead of showing a readonly form with a message will cause a lot of users to press F5 in order to get a new form ready for input the two following solutions will be better:

  • Redirect to a new page with confirmation
  • Show form ready for new input and include javascript to show a notification that previous input was accepted
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.