SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


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.