All Questions

320
votes
9answers
205880 views

What is ViewModel in MVC?

I am new to ASP.NET MVC. I have a problem in understanding the purpose of a ViewModel. What is a ViewModel and why do we need a ViewModel for an ASP.NET MVC Application? It is better if I can have...
5
votes
3answers
3879 views

jquery ui datepicker and mvc view model type datetime

I am using jquery datepicker on my view model Here is my view: @Html.TextBoxFor(o => o.JobStartDate, new { id = "dt1", @class = "input-block-level" }) @Html.ValidationMessage("JobStartDate") an...
83
votes
11answers
133048 views

Two models in one view in ASP MVC 3

I have 2 models: public class Person { public int PersonID { get; set; } public string PersonName { get; set; } } public class Order { public int OrderID { get; set; } public int Tota...
7
votes
1answers
8361 views

How to call functions in a main view model from other view models?

My program is composed of a TreeView and two contentPresenters at ground level. The mainWindow, TreeView, and each contentPresenter all have their own viewModels. I would like to call a function in t...
34
votes
2answers
11486 views

ViewModel with List<BaseClass> and editor templates

I have a view that lists tables being added to a floor plan. Tables derive from TableInputModel to allow for RectangleTableInputModel, CircleTableInputModel, etc The ViewModel has a list of TableInpu...
34
votes
1answers
128093 views

How to bind WPF button to a command in ViewModelBase?

I have a view AttributeView that contains all sorts of attributes. There's also a button that when pressed, it should set the default values to the attributes. I also have a ViewModelBase class that i...
25
votes
3answers
8401 views

Why should I use view models?

I'm new to developing web apps using ASP.NET MVC. In fact, I'm rather new to developing web apps, regardless of technology. Currently, I'm working on a project just to get to know the ASP.NET MVC fra...
36
votes
3answers
38406 views

ASP.NET MVC - How exactly to use View Models

Let's say I have a page that allows the editing of a user's details, so I have a ViewModel like this: public class UserViewModel { public string Username { get; set; } public string Password ...
69
votes
5answers
58616 views

ASP.NET MVC Model vs ViewModel

OK, I have been hearing discussion about "ViewModels" in regards to MS's ASP.NET MVC. Now, that is intended to be a specific kind of Model, correct? Not a specific kind of View. To my understanding...
21
votes
4answers
17187 views

ASP.NET MVC ViewModel Pattern

EDIT: I made something much better to fill and read data from a view using ViewModels, called it ValueInjecter. http://valueinjecter.codeplex.com/ it is used by http://prodinner.codeplex.com - an ASP...

Previous Next