ASP.NET MVC 4 is the fourth major version of the ASP.NET Model-View-Controller platform for web applications.

learn more… | top users | synonyms

0
votes
0answers
6 views

Ninject's different behaviour during debug with visual studio 2012

I encountered a strange problem when using ninject in mvc4 project. Simply speaking, I want inject multiple IxxxRepository into controller, each IRepository constructed with IUnitOfWork ...
0
votes
0answers
27 views

Linq Query for Tags/Fields

I am new to Linq and I have difficulties querying the database for a result containing multiple tag IDs. So, I have two models: Folders and FieldTags. The Folder holds a string with all FieldTag IDs ...
0
votes
0answers
9 views

global variable in asp.net mvc 4 across all views

Good day, I want to make a global variable of a string for the src location of my css files so that i don't have to type it out every time, and if I change the position of it then i just need to ...
0
votes
1answer
22 views

Is it wrong to alter data from controller's GET method

This is a best practice question I'm struggling with for a while now. From a page with search results (accounts that need to be approved), I want to navigate to a page (GET-request) with the id of ...
0
votes
0answers
5 views

how can i change menu view by user access role?

I have a web application project with MVC 4 and I use Telerik panel bar and bind it by site map for my menu.but now i want to each user according to user access roles in my program see particular ...
0
votes
0answers
12 views

Mailing Function using Knockout Js in mvc4

This is my code I am creating email details list using knockout js and In this code my data is proper bound but not to displayed? What I'm trying to implement is bound successfully but not shown in ...
0
votes
0answers
23 views

AngularJS and ASP.NET MVC integration and bootstrapping

I'm writing a web application that will mainly use AngularJS for its modularity and testability and ASP.NET MVC server side technologies for model validation. The idea is to load PartialViews in ...
0
votes
1answer
19 views

UpdateModel does not work when declaring type is different

Here is code example of what i am asking. public ActionResult Action() { object person = new Person(); //It works if i replace object with Person UpdateModel(person); //this ...
0
votes
1answer
11 views

How to render a partial view from a different model/controller?

I have the following partial view called _Categories residing in ~/Views/Category/_Categories: @model IEnumerable<MyBlogSite.Models.BlogPostCategory> <ul> @foreach (var item in Model) { ...
0
votes
1answer
22 views

Set Label for checkbox in razor

How to set label to the checkbox, I looked at some sites they r using lambda expressions, but I cant understand, I am new to mvc @{ bool chkVal = false; } ...
0
votes
1answer
11 views

Razor create link to route

I've just installed Elmah in my MVC application. It magically added a route in Web.config: <add key="elmah.mvc.route" value="elmah" /> Which I can access through: localhost/elmah How can I ...
0
votes
0answers
11 views

Html.ActionLink to call an action from a different controller that's in a different folder

I've got a simple view that creates a link if a login is successful and is located under /Login: <div> @Html.ActionLink("Add a new Organization", "AddOrganization", ...
0
votes
0answers
5 views

ASP.NET FileDependency caching not working when accessing the page

Basically what I want to do is a full server-side caching, and disable client-side caching. [OutputCache(Duration = 3600)] public ActionResult getImage(string imagePath) { ...
0
votes
1answer
17 views

MVC Razor form closes immediately after opening?

I have a table that displays some data as well as an "Edit" button, and when the button is clicked the row is replaced with a Partial View that contains a row with input controls for changing the data ...
0
votes
0answers
16 views

How do I force the value in a textbox in a form to a default value when the value entered is invalid?

For example, in the controller view setup below everything works fine except that when I type something ridiculous in the textbox like 99/12/2014 it doesn't set it to the default 29/12/2014 when I ...

1 2 3 4 5 787
15 30 50 per page