Top "Asp.net-mvc-viewmodel" questions

View model is a class, that represents data model used in specific view.

Using a PagedList with a ViewModel ASP.Net MVC

I'm trying to using a PagedList in my ASP.Net application and I found this example on the Microsoft website …

c# asp.net-mvc asp.net-mvc-viewmodel pagedlist
The model item is of type CookMeIndexViewModel, but requires a model item of type IEnumerable<CookMeIndexViewModel>

I am following along with the music store example to try learn ASP.NET MVC. I'm creating a cookbook application. …

asp.net asp.net-mvc-3 asp.net-mvc-viewmodel
How to pass model to partial view

I have two view models: public class ParentViewModel { public Id { get; set; } ..... public ChildViewModel Child{ get; set; } } public class ChildViewModel { …

asp.net-mvc partial-views asp.net-mvc-viewmodel
ViewModel Best Practices

From this question, it looks like it makes sense to have a controller create a ViewModel that more accurately reflects …

asp.net-mvc asp.net-mvc-viewmodel
MVC ViewModel example

I've been doing tutorials and trying to learn best practice when it comes to MVC development. The design I'm using …

c# asp.net-mvc-5 controllers asp.net-mvc-viewmodel
ASP.NET MVC View Model not binding on HTTP Post with DropDownList

I am having an issue that when I post to a controller I lose binding and everything in my view …

asp.net-mvc-3 razor http-post asp.net-mvc-viewmodel
required attribute not working in asp.net mvc

I have a simple strongly-typed view. @model GoldForGold.Models.LogonModel @{ ViewBag.Title = "Logins"; Layout = "~/Views/Shared/_Layout.cshtml"; } Logins @using (…

c# asp.net-mvc asp.net-mvc-viewmodel
Using PagedList with a viewmodel MVC 3

I am trying to implement IPagedList with a viewmodel, my main view declaration is @model PagedList.PagedList<CustomerOrders.WebUI.…

c# asp.net-mvc asp.net-mvc-3 asp.net-mvc-viewmodel pagedlist
MVC ASP.NET No parameterless constructor defined for this object

When I click submit in order to create an account the following error is displayed. I can't find why it …

asp.net-mvc asp.net-mvc-3 viewmodel asp.net-mvc-viewmodel
MVC - Passing multiple data tables to a view

I currently have the following code in the HomeController of my MVC project: public class HomeController : Controller { public ActionResult Index() { …

c# asp.net-mvc linq asp.net-mvc-viewmodel