I want to use a simple URL query parameter to display customized confirmation messages like “Message sent” or “Message deleted”. I want to model it similar to how Flickr does it. Their URLs look like http://www.flickr.com/photos/username/?success=1 and then show a success message.
How do I go about doing this in ASP.NET MVC using a Controller’s return View(modelObject)? The overloaded methods for return View() aren’t very helpful.
You’ll need to add a name/value pair into the ViewData dictionary, e.g.
Then access the same in your view: