I want to do something, like edit my email address in a profile page, then return to the homepage saying it was successful – just like stackoverflow does when you receive answers or earn a new badge.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try using TempData:
TempData["Message"]will be still there after redirection. TempData persists to next request, then it is gone.