mvc

MVC Navigate to different controller view

I'm having trouble navigating to a different controller view from another controller action. e.g. return view("edit", "profile", profile); I'm trying to navigate from the account controller to the edit view in the profile controller. Any suggestions? Thanks, -Mike ...

.Net MVC: Bind route value to a session value

Hi I want to do the following: The user should have his own sub site on my web site. Therefor I've added a new route: routes.MapRoute( "ShopEntered", "{username}/{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" } ); When the site gets called for the first time I want to store the username...

Reading label Data from MVC view using Model binders

We are having MVC view where user can select few fields. I want to read the data from the view. Currently using model binders i am able to read only the changeable data (from text box) into the object. How do i read the data held in label in the view using model binders? ...

please help cant get my head around multiple models in one view

i have tried till my head hurts and have been reading so much my eyes now bleed. i have a controller, and i want to get one set of data for the order and one list for the order items. i have created a order class and a order items class, and trying to get it so that the order will have a list of order items but it is crashing my brain ...

Suggest a good MVC framework for AS3

I am looking for a framework that can simplify the task of creating new Flash apps. But I don't want to go the Flex route because it's way too top-heavy for the simple widget apps that I need to create. (The payloads often exceed 300k with a Flex app and it can be difficult to control the timeline and animation, etc.) When I Google the ...

Why does the head tag comes with runat attribute?

Background: Sorry if this is an obvious question. But I have no experience whatsoever with asp.net... Im just starting out with asp.net mvc without passing through webforms at all...I do have experience with web developing but with php+codeigniter... anyway. Question: whats the purpose of having the runat attribute inside the head tag ...

CakePHP edit multiple records at once

I have a HABTM relationship between two tables: items and locations, using the table items_locations to join them. items_locations also stores a bit more information. Here's the schema items_locations(id, location_id, item_id, quantity) I'm trying to build a page which shows all the items in one location and lets the user, through a ...

MVC - Separation of Concerns

I'm a newbie. I want to ask about the MVC model for separation of concerns. I have read up a few MVC tutorials but I don't yet have a full understanding of the roles of each of the Model, View and Controller. For instance say I am writing an application for a user to monitor a portfolio. I would like the landing page to display lists o...

Implementing the View in MVC or MVP (in PHP)

I've experienced first hand the extent of the horror and foot-shooting that the ugliness of PHP can cause. I'm onto my next project (you may be wondering why I'm not just switching languages but that's not why I'm here) and I've decided to try doing it right, or at least better, this time. I've got some models defined, and I've started ...

ASP.NET MVC Views problem

Hi, I'm hit a problem when attempting to deploy a MVC app as a sub-application of an existing ASP.NET 3.5 app (non MVC). The error is: - The view 'index' or its master could not be found. The following locations were searched: ~/Views/employment/index.aspx ~/Views/employment/index.ascx ~/Views/Shared/index.aspx ~/Views/Shared/index.as...

Asp.NET MVC Areas

So we finally got "areas" in our ASP.NET MVC framework! I'm able to get them up and going but one thing that bothers me is the amount of development servers it instantiates! So I currently have 6 areas, and when I run it I get 6 dev server instances running. Is this really necessary? MSDN is having me setup these areas as seperate we...

asp.net mvc custom modelbinder - how to perfom updates with assosciated entities

Hi All I am trying to understand how associated entities are updated when using custom modelbinders. If you have a Product entity with a relationship to a Category entity and you are displaying a list of category choice for a product in a dropdown on a form. The the user assigns a new category and that change needs to be persisted wit...

Why am I getting a different xml file open behaviour depending or where I open the sln file?

Ok, I know that question is not very informative.. Someome feel free to change it after I explain: My asp.net mvc project is stored in a folder in my desktop. When I double click on the sln or csproj to open the project and then hit the Start Debuggin button it all works fine. But, when I go to start, programs and open Visual Web devel...

strongly typed data to ViewPage

Hi I'm looking for a good solution to pass two generic objects to a viewpage like ViewPage The view should render a Customer, and the SomePresentation holds data used in the view, could be a list of cities where a customer holds one city. I don't want to use ViewDate["somedata"] for various reasons. So if anybody has a solution to g...

ASP.Net MVC support for Nested Resources?

I'm looking for a routing option similar to the nested RESTFul routes functionality available through Rails. The SimplyRestful project on MvcContrib doesn't appear to be active any longer nor does it appear to be current with the 1.0 MVC release. This is the uri scheme I'm looking for, /Activity/10/Task/1/Edit or /Activity/10/Task/Edi...

Disable button on submit with xVal MVC

Hi: I have an MVC app using xVal. I am trying to hook into the jquery validation to show a "loading" graphic once the form is valid. I cannot seem to find a way to only show the qraphic when jquery has validated the form. However, it also disables the button when the button is clicked and is NOT validated stopping the user from re-subm...

MVC-ish : Who is responsible for loading the data?

I just got out of a small project and I've tried to follow a somewhat domain-driven design (well, what I think it is...). I've struggled a bit were some of my domain class started to need to load something. I'm not sure this is the right place for it. Let's take for example a boring image slideshow. For my domain classes, I would define...

Asp.net MVC introduction

Where can I find some asp.net MVC introduction articles/tutorials. ...

How to simiulate a JSON call from an HTTP GET Call?

At this moment I am calling my index view in one of two ways. Using the normal http view and serializing it JSON. In order to test it I am using the code below, and it works. I want to get it with a http get call. Like (http://localhost/article,json or something similar. Any ideas. $.getJSON("/Article", function(json) { $...

How does ASP.NET MVC relate to WCF?

A Guide to Designing and Building RESTful Web Services with WCF 3.5, this article explains the foundations of REST and how it relates to WCF. MVC uses REST as the architectural model. I am guessing one can use the .NET MVC to create web applications that have both a front end and an API point, but I am not sure if the safe way of buildi...