The view or its master was not found or no view engine supports the searched locations

前端 未结 14 2259
挽巷
挽巷 2020-12-02 15:05

Error like:The view \'LoginRegister\' or its master was not found or no view engine supports the searched locations. The following locations were searched:

14条回答
  •  一生所求
    2020-12-02 15:48

    I came across this error due to the improper closing of the statement,

    @using (Html.BeginForm("DeleteSelected", "Employee", FormMethod.Post))

    {

    } //This curly bracket needed to be closed at the end.

    In Index.cshtml view file.I didn't close the statement at the end of the program. instead, I ended up closing improperly and ran into this error.

    I was sure there isn't a need of checking Controller ActionMethod code because I have returned the Controller method properly to the View. So It has to be the view that's not responding and met with similar Error.

提交回复
热议问题