mvc

Passing two different models to a view with ASP.Net MVC

I'm trying to set up a view that displays two different models. For example, I have a "Details" view that shows details of a customer; which I am passing my customer model. I also want to have a section on the page under the customer information (I was thinking about using a partial view) that lists their pets (for a vet practice). I ...

In the MVC pattern, what goes in the model and what goes in the view?

I'm using the MVC pattern to design some data analysis software (in python). I'm not sure whether some functions should go in the model or the controller. The way I've designed it, the user supplies the program a configuration file which contains the parameters for analysis. The program parses this file to find out what data files to lo...

Ninject 2, mvc and web forms

I'm using Ninject 2.0 in an asp.net app which is mvc and has web forms. This seems to be causing a problem with my Application class, as it inherits NinjectHttpApplication from Ninject.Web.Mvc But my master page is expecting a NinjectHttpApplication from Ninject.Web. Has anyone got mixed apps working with Ninject 2.0? ...

MVC - C#, ASP.net: Tutorial wanted

Hello all, I am looking for MVC (not asp.net-MVC) tutorial for Web App with C# somewhere. Are they any good online tutorials. Thanks ...

image upload ??????

hello all, i am having a mvc application.A web project and the language i am using is C#. i am having a update category form and in that there is a file upload control please tell me how will i do the update functionality because in the update controller we usually pass the collections object. please tell me what will I do..and How wi...

Supporting multi-add/delete (and undo/redo) with a QAbstractItemModel (C++)

Greetings, I've been writing some nasty code to support the undo/redo of deletion of an arbitrary set of objects from my model. I feel like I'm going about this correctly, as all the other mutators (adding/copy-pasting) are subsets of this functionality. The code is nastier than it needs to me, mostly because the only way to mutate the...

URL Rewriting In PHP MVC Framework

Hello there, I have made my own custom php framework which implements MVC design pattern. In it, all URLs are constructed like this mysite.com/index.php?route=controller/function/parameters/go/here mysite.com/index.php?route=products/shirts/99 etc I have put in place htaccess to remove index.php?route= part from URLs to make them m...

Call a Kohana helper from cron (or any URL)

I need to call a Kohana helper (or any php MVC framework) from a Cron job. How can I do this? The server is Linux, so, I can only think of two possible solutions: 1- Open an URL from the cron job, which hits a controller and does what it has to do. 2- Call a Kohana controller without passing through the web server, but with the PHP CLI. ...

mvc procedure question

Hello, I am borrowing some codeigniter authentication library and try to integrate it with my mvc version. My version initiates breadcrums in the basecontroller and every module has it's own controller that extends it. What I want to know is if I am submitting my login form, then my submit action will be /controller/function. But, I d...

MVC - Model View inside of another Model View

Is it good practice to use one model view inside of another one and how will AutoMapper work with it? Example: public class CustomerModelView { public string FullName {get;set;} public string IList<OrderListModelView>(get;set;) } ...

MVC + RegisterClientScriptInclude / RegisterClientScriptBlock

Is there any MVC equivalent to Page.ClientScripts.RegisterClientScriptInclude and Page.ClientScripts.RegisterClientScriptBlock? I am looking to create Partial Views which may very well be referenced multiple times from the same main view. These views might very well have their own script requirements but it seems wasteful to write incl...

Relations in your model in a MVC application?

Now I have an model User which represents an user in the application. And I use an UserRepository with methods like getById($id) and getAll(). An user can post reviews. If I want to show the 5 or 10 or maybe 20 last reviews of an user it's most logical to ask the user I think. So I would have a method $user->getLastReviews(5). But wha...

Designing MVC URL scheme for hierarchical system

So imagine I'm building a Multi User Dungeon system using a MVC web application. To describe the areas the player can explore, the system can contain a number of Maps, which will consist of Rooms and Doors - where doors connect two Rooms. Consider the authoring part of the system. To create a Map is easy - I need URLs like: /Author/Map...

Binding to HttpContext.Current.Session w/ Static Variable Does Not Work

Original Question Hello All, I'm a bit confused on how MVC maps HTTP requests to session state. My HTTP request looks like this: GET / HTTP/1.1 Host: test.net Connection: keep-alive User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.32 Safari/532.0 Accept: application/xml,...

iPhone MVC. Need some help with understanding how to correctly pass data from Controller to View.

A little background: I'm a C# developer starting to mess with the iPhone (have an idea for a simple 2D game). The only MVC programming I've done was for the web (ASP.NET MVC) so although I do have an understanding in MVC, I can't wrap my mind around one thing. Here's an example to illustrate. Say I have a simple app where all I want to...

MVC Framework for Swing

Is there any MVC framework for Java SE application ???? if we use Java EE we can use Spring or Struts, How about Java SE ? ...

Are "passive" objects considered a good design practice?

I find myself very often creating an object that has no public methods and is self-contained. It typically handles events of arguments passed to its constructor in its private methods and does not raise any events or expose any public methods. I am calling this type of objects "passive" objects - objects that do not have any public meth...

405 Error uploading file

I am using Steve Sanderson's jQuery AJAX SWFUploader. I have got it all working for the most part, except the most important part. When I choose a file, it starts to upload (the progress bar advances) but then it give me a 405 error. Not sure why I get this error but I am using MVC here just like his example. I'm wondering if testing it...

Looking for a PHP MVC framework that just implements architectural goals and design patterns, nothing more

Hello, I have been looking for a good PHP MVC framework that is interested primarily in speed, security, and implementing the MVC design architectural style. Some of the biggest beefs I have with a lot of the mainstream MVC frameworks out there is that they: put view logic in controllers, or do things like: controller: $form = "a for...

F# Asp.Net CodeDom ProviderOptions Issue

I'm creating an ASP.NET MVC application using F# on IIS 7. When I attempt to run it from the browser, I'm met with a YSOD containing the following: [ArgumentNullException: Value cannot be null. Parameter name: dictionary] System.Collections.Generic.Dictionary2..ctor(IDictionary2 dictionary, IEqualityComparer`1 comparer) +127...