c#,asp.net-mvc-4,razor,grid.mvc
Usually this means that you're using the reserved "Model" keyword erroneously somewhere. In your case: @Html.DropDownListFor(Model => Model.CoursePackageID... Change this to: @Html.DropDownListFor(model => model.CoursePackageID... ...
asp.net-mvc-4,asp.net-mvc-partialview,grid.mvc
From Comment to Answer According to the documentation provided by Grid.Mvc, @Html.Grid uses a partial view _Grid.cshtml. Because your partial view also has same name, the solution is to use a different name for your partial view....
c#,asp.net-mvc,asp.net-mvc-5,grid.mvc
make the list of Catagory (btw it's spelled 'Category') be a property of a new view model. public class MyViewModel { public Category CategoryToInsert { get; set; } public IEnumerable<Category> CategoriesToShow { get; set; } } View: @model MyViewModel ... ... @Html.Grid(Model.Categories).Columns(columns => ... @* Insert form: *@ @Html.LabelFor(m =>...
c#,asp.net-mvc,razor,asp.net-mvc-5,grid.mvc
I'm not sure if this is the most correct way of going about what I'm after, but what appears to be working for me is the use of a Session value. In my GET method I store the URL: Session["returnURL"] = Request.UrlReferrer.AbsoluteUri; Then in my POST I use this value...