Modifying Genre Controller

It is more difficult to handle user's input in creating a new genre (HttpPost) than populating an empty Genre view. Hence, we will focus on that.

Actually, we already learned about them in previous project. First, create an actionResult

[HttpPost]
public ActionResult Create(GenreModel model)
{
    try
    {
    }
    catch
    {
        return View(model);
    }
}

Inside try function, we will perform submit form method. In previous project, we have done it by checking ModelState is valid or not.

results matching ""

    No results matching ""