title: asp.net mvc actionresult retains parameter values even after page refresh?
body: <p>I am setting an error Message in the viewbag to show to the user after each postback how ever I do not want to show this error message on page reload or refresh. I have tried to set it to null but it still is shown because the json parameter still contains the values of the first submit.</p>
  
  <pre><code>        [HttpPost]
          [CustomAuthorize(Definitions.RoleAnalystManager, Definitions.RoleProjectManager)]
          public ActionResult ExportReportAllMediaDetailsCsv(string json)
          {
              ViewBag.Error = null;
  
              var serializer = new JavaScriptSerializer();
              var reportParams = serializer.Deserialize&lt;ReportAllMediaDetailsParams&gt;(json);
  
  
              var rows = uow.Items.Report_AllMediaDetails(reportParams.profileID, reportParams.organisationID, reportParams.startDate, reportParams.endDate).ToList();
  
              if (rows.Count &lt;= 1)
              {
                  ViewBag.Error = "There were no results for the provided parameters, please adjust the parameters and try again.";
                  return View("AllMediaDetails");
              }
  </code></pre>