133
votes
10answers
30k views

ViewModel Best Practices

From this question, it looks like it makes sense to have a controller create a ViewModel that more accurately reflects the model that the view is trying to display, but I'm curious about some of the ...
25
votes
8answers
7k views

MVC Learning Resources [closed]

Can someone recommend some good resources for learning about MVC? I've been doing ASP.Net since it came out, but I've never gotten into MVC at all. I want to understand how it works, why it's better ...
17
votes
6answers
5k views

Client Id for Property (ASP.Net MVC)

I'm a begginer in asp.net mvc, and I have a doubt: I'm trying to do a label for a TextBox in my View and I'd like to know, how can I take a Id that will be render in client to generete scripts... for ...
23
votes
10answers
13k views

ASP.NET MVC vs. Django - Which framework should I learn? [closed]

I am starting a new web project where using MVC framework seems appropriate. My background is mostly with .Net / ASP.NET, so using ASP.NET MVC looks like the easiest way. I read that django is very ...
57
votes
14answers
6k views

ASP.NET MVC and Model-view-controller pattern - where do I start from? [duplicate]

Possible Duplicate: MVC Learning Resources I'd like to improve my understanding of MVC design pattern, as I'll be probably using it in the future (my job is mainly focused in developing ...
12
votes
2answers
6k views

Strongly-Typed ASP.NET MVC with ADO.NET Entity Framework

I've finally gotten this working after days of struggle. I've got a simple database of People and Departments: I can use strongly-typed ASP.NET MVC views for reference/navigation properties! See ...
17
votes
3answers
2k views

“Security aware” action link?

How can I create a "security aware" action link that detects if a user is authorized to click (invoke) the action? Hide link if user is not allowed to use that action... Depending from web.config ...
27
votes
3answers
8k views

How can I get the route name in controller in ASP.NET MVC?

ASP.NET MVC routes have names when mapped: routes.MapRoute( "Debug", // Route name -- how can I use this later???? "debug/{controller}/{action}/{id}", new { controller = "Home", action = "Index", ...
14
votes
7answers
74k views

ASP.NET MVC - Html.DropDownList - Value not set via ViewData.Model

Have just started playing with ASP.NET MVC and have stumbled over the following situation. It feels a lot like a bug but if its not, an explanation would be appreciated :) The View contains pretty ...
33
votes
4answers
7k views

Fat model / thin controller vs. Service layer

I have been developing enterprise applications for many years using .Net My apps usually have a domain model containing entities mapping to SQL DB tables. I use a Repository pattern, Dependency ...
18
votes
2answers
20k views

How can dynamic breadcrumbs be achieved with ASP.net MVC?

How can dynamic breadcrumbs be achieved with ASP.net MVC? If you are curious about what breadcrumbs are: What are breadcrumbs? Well, if you have ever browsed an online store or read posts in a ...
11
votes
3answers
28k views

MVC - Using Ajax to render partial view

I have this markup in an MVC app. <div id="ingredientlistdiv"> <% Recipe recipe = (Recipe)Model; %> <% Html.RenderPartial("IngredientsListControl", recipe.Ingredients); %> ...
8
votes
3answers
4k views

ASP.NET MVC Url.Action adds current route values to generated url

I have seen this question a couple of times here in SO but none of them with any acceptable answer: ASP.NET MVC @Url.Action includes current route data ASP.NET MVC implicitly adds route values ...
2
votes
3answers
12k views

MVC LINQ to SQL Table Join Record Display

Im having problems displaying records to my view when passing viewdata to a user control. This is only apparent for linq to sql objects where I am using table joins. The exception I receive is ...
16
votes
6answers
5k views

IE9 throws exceptions when loading scripts in iframe. Why?

Precondition: I have an aspx-page with iframe inside. This iframe points to the url handled by MVC on the same site (it's hybrid site, both standard ASP.NET and ASP.NET MVC). The resulting page ...

1 2 3 4 5 13
15 30 50 per page