mercredi 13 janvier 2016

Clear Button Name Parameter in ASP.net

Hi Im new to ASP and MVC3 and my question is how can i clear the button name parameter in my Post because everytime I refreshes my page after clicking the button with the button parameter , the Value of my last clicked button is still there, is there any way to clear this thing up after Submit or when refreshing the page in Controller or by using Jquery?

Thanks

Heres my Code Snippet:

[HttpPost]
    public ActionResult HistoryPage(HistoryModel model, string btnAction)
    {
        if (Session["HistoryId"] != null)
        {
            switch (btnAction)
            {
                case "Delete History":
                    DeleteHistory(model, ref deleteHistoryError, ref deleteHistorySucesss);
                    break;
                case "AddHistory":
                    AddHistory(model);
                    break;

            }
        }
        return View(model);
    }

Aucun commentaire:

Enregistrer un commentaire