Top "Asp.net-mvc-viewmodel" questions

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

To insert Data into Multiple Tables using MVC ASP.NET

I am new to MVC ASP.NET. Although this might have been solved in the past but I still can't …

asp.net-mvc master-detail asp.net-mvc-viewmodel
ASP.NET MVC Core date only format is not working using DataAnnotation

Following viewmodel used in a view is supposed to display a StartDate as, say 9/30/2015. But it is displaying as 9/30/2015 12:00:00 AM. …

asp.net-core data-annotations asp.net-mvc-viewmodel
MVC3 Custom Validation error message doesn't display when using ViewModel

SUMMARY Question: Why doesn't the custom validation error message show when using a ViewModel. Answer: The custom validation should be …

asp.net-mvc-3 validation asp.net-mvc-viewmodel
EmailAttribute is not validating correctly in a ViewModel from ASP.NET Core

This is a field located in my viewmodel: [Required(ErrorMessage = "Email is missing."), EmailAddress(ErrorMessage = "Email is not valid.")] public …

c# asp.net-core asp.net-core-mvc email-validation asp.net-mvc-viewmodel
ViewModel not being passed back to controller in POST method

Simple problem, but I can't figure out what is missing. I have a simple ViewModel (it'll get bigger): public class …

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