mvc

Correct way to access an NSMutableArray between two UIViewControllers ?

Design question: I have ViewController A which contains an NSMutableArray*. The ViewController A is responsible for displaying the user a Map, when the user interacts with this map, the view controller A fills the NSMutableArray* with Coordinate Objects. The information contained in the NSMutableArray* should be later displayed in a ...

What is the HMVC pattern?

Reading Kohana's documentation, I found out that the main difference in 3.0 version is that it follows the HMVC pattern instead of MVC as version 2.x does. The page about this in Kohana's docs and the one on wikipedia didn't really give me a clear idea. So question: what is the HMVC pattern and how does it differ from MVC? ...

Guide for creating ASP.NET MVC RESTful API on Azure

I want to create a simple ASP.NET MVC RESTful API, but I want to create it on Azure. Any recommendations, tips & tricks, or examples on how to do this? ...

How can I add custom URL parameters to a MVC RedirectToAction

Hi I currently have a simple MVC RedirectToAction action... return RedirectToAction("Edit", "Customers", new {Id = iNewId}); ... which redirects to Cutomers/Edit/1 However I’d like to append some custom values to the URL which will get used by javascript, returning URLs such as Cutomers/Edit/1#Tab1 What is the best method of doing ...

PHP MVC general question

I'm building a small MVC framewrok for a specific PHP application - using Doctrine as ORM. I'd like to know what it would be the best practice to manage the frontend Menu. My application has 3 menus (horizontal menu, left menu, bottom/footer menu) that can be edited by the site Admin (the menu is stored in a Doctrine NestedSet). Where ...

What type of ActionResult should I return from an MVC Action where I want javascript to either redirect or update a div?

Let me first outline my objective from a user's perspective and then the code I have to achieve that goal where its falling short. I'd like the user to be able to click a button, which brings up a jQuery modal style dialog with a few fields on it and a submit + cancel button. When they successfully commit the record I'd like to have the...

Good example / tutorial of adding and editing a data row in a lightbox using ASP.NET MVC?

Hi, Im looking for a good example or tutorial which demonstrates adding and editing a data row (presented in a HTML Table) in a light box using ASP.NET MVC? Many thanks ...

Expression Web 3.0 SuperPreview on a .Net MVC 1.0 Web site

Hi All, We are trying to use Web Expression 3.0 feature SuperPreview to make our site consistent across multiple browsers. Our's is a MVC 1.0 application. Has anyone tried to use SuperPreview on that ? Your advise will be very helpful. ...

Struggling with model relationships

I'm having a hard time designing a relationship with a few models in my project. The models are: band, musician, instrument Bands have multiple musicians Musicians have multiple bands and multiple instruments That’s all pretty straightforward, but I also need to keep track of what instruments a musician has for a particular band. So ...

ASP.NET MVC Login Route

Hi, Currently I am using ASP.NET MVC and have home/index for logged out user which appears as "/" but this has got me confused as to how I can have "/" for a logged in user? I could modify like 127.0.0.1/home - but I want it like "/". My confusion relates to the fact that the "/" [127.0.0.1/] is bound in the routes collection to home/i...

Edit/Review/Save scenario in mvc

I am looking for clean approach on the "Edit/Review/Save" scenario in asp.net mvc: Our customers can "edit" their accounts information which will affect their monthly premium, but before saving the information we need present them with "review" screen where they can review their changes and see a detailed break down of their monthly pre...

How can I access a codeigniter config variable from a model/controller?

I would like to access the $db['default']['dbprefix'] variable from /application/config/database.php from within a model so I can write my own queries using the value from the file. How can this be done? ...

asp.net MVC ActionFilter for remove empty lines in result

Please help me with this action filter. I think i need to use OnResultExecuted method How can i have access to otput html and replace something in them? thank you. ...

How to send complex objectfrom view to controller using ajax?

In my view i`m having various ul each containing various li and each li contains a textbox, in which the user enters information. <ul id="ul1"><li><input type="text"></li><li><input type="text"></li></ul> <ul id="ul2"><li><input type="text"></li><li><input type="text"></li></ul> I also have a table which has 2 columns and various row...

ASP.NET MVC. Extending HtmlHelper vs Custom class

What are the advantages of extending HtmlHelper instead of creating a Custom Class. f.e. <%= Html.Table(data) %> vs <%= CustomClass.Table(data) %> ...

DefaultModelBinder Problem with nested levels + other binders

I have what I would think is a somewhat normal situation where I need to bind form posts to an "order" model. This model has a few levels of information to it: Order.Billing.FirstName Order.Billing.Address.City Order.Billing.Address.Country Using the DefaultModelBinder, if I POST a form to an action that takes this Order model as the ...

polymorphism and n-tier applications

Hi all, I have this doubt for a long time... hope anyone can enlight me. Suppose I have 3 classes in my model. abstract class Document {} class Letter extends Document {} class Email extends Document {} and a service class with a method that returns a Document (either a Letter or Email). class MyService { public Document getDoc(...

ModelBinder does not update the session key

I created a Website(it is poco object) model binder, that checks the sessions: public class WebsitesModelBinder:IModelBinder { private const string websitesSessionName = "SelectedSite"; #region IModelBinder Members public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) ...

how to send multiple jquery arrays to mvc controller

I have created and filled various arrays using jquery. First time, trying to send javscript arrays to mvc controller. Can I have an example how to do that? How can I send the arrays and other variables as well? On the controller side, how can I retrieve the data? ...

Where to put certain logic in CakePHP

I've recently started to rewrite a project I did a few years ago using CakePHP. I'm trying to do everything 'right' this time, so maybe someone get give me a a pointer on doing to the following: I'm showing a simple table from a table using Model->find('all') in the View. There are two boolean fields in this table, that together make up...