The tag has no wiki summary.

learn more… | top users | synonyms

8
votes
2answers
216 views

How can I make the Required attribute for my custom DropDownList editor template operate client side?

I have an editor template for DropDownLists that is marked with an attribute like this: [AttributeUsage(AttributeTargets.Property)] public class DropDownListAttribute : UIHintAttribute { public ...
7
votes
2answers
452 views

ASP.NET MVC 4 ViewModel With Child Interface

Is there a way to handle this without custom Model Binding? public class MyViewModel { public string UserId { get; set; } public IJob Job { get; set; } } public interface IJob { public long Id ...
6
votes
2answers
908 views

ViewData and ViewModel in MVC ASP.NET

I'm new to .Net development, and now are following NerdDinner tutorial. Just wondering if any of you would be able to tell me What is the differences between ViewData and ViewModel (all I ...
5
votes
2answers
672 views

ASP.NET MVC with nested view model and Knockout

Cannot get my brain around how to implement knockout for the following ASP.NET MVC 4 nested view model : public class MyProfile { public string Name { get; set; } public IList<VM1> List1 ...
3
votes
2answers
102 views

Decoration on ViewModel property to use a different name for binding

On MVC3, is there a way to decorate a ViewModel property in order to get the DefaultModelBinder to use a different name for it in the request? For example, suppose you have the following view model: ...
2
votes
2answers
1k views

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 get a complete Solution to my problem. Problem : I have two tables Video Columns are : VideoID, ...
2
votes
3answers
446 views

Incorrect model property value rendered in partial view

I have a strongly-typed partial view whose model contains a property with the same name as the parent page's view model. For some reason the rendering engine is rendering the parent view model value, ...
2
votes
2answers
424 views

Show multiple models in a single view using ViewModel in Razor MVC3 (with only Details in view)

My task is to show multiple models into a single view.I've created a ViewModel for my requirement but I'm not meeting my requirement. please have a look into the below code and rectify me where m i ...
2
votes
1answer
59 views

Update content depending on string in view model

I am running an MVC application, which have a view model like this: public class UserListViewModel { public UserListViewModel() { Users = new List<UserViewModel>(); ...
2
votes
1answer
654 views

ASP.NET MVC - Getting selected value from a dropdown as a model

I would like to know if there is a way to popuplate a model from dropdownlist selection. For example: My view is bound to the model Employee and the Employee class has a property 'Department' which ...
2
votes
1answer
98 views

Expert opinion on lambda expressions - ViewModels

I'm fairly new to ASP.NET MVC and to lambda expressions, so I'm trying to figure out the best way to do this. The situation: Clients have support tickets. I have a ViewModel that I just want to show ...
1
vote
3answers
691 views

ViewModels with asp.net mvc 4 and EntityFramework whats the Point

I'm debating with myself whats the point in creating ViewModel classes in a project which uses Entity Framework? I currently have a project which uses EntityFramework. My solution is structured ...
1
vote
2answers
1k views

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 model is NULL. Here is the code I am using: View: @model ArticleCategoryVm @using (@Html.BeginForm()) ...
1
vote
1answer
180 views

MVC validation lost in Knockoutjs post

I'm using MVC4 and knockout. I have a form on a page that is strongly typed to a viewmodel. In that viewmodel I have some validation defined, for instance: [Required(ErrorMessage = "Title is ...
1
vote
1answer
660 views

Knockout view model posts back to ASP.NET MVC partially - how to post back complete object?

Having these ASP.NET MVC view models: public class User { public string Name { get; set; } public LabeledEmail LabeledEmail { get; set; } } public class LabeledEmail { public ...

1 2 3 4 5 6
15 30 50 per page