mvc

Get ALL items in a SelectList within ASP.NET MVC controller

Is there a way to post all items in a SelectList (multiselect) to the method of a controller? By default when I use a SelectList it will only post the selected items to the Form. I have a couple of MultiSelect controls on a View. Using jQuery the user can move items from ListBox1 to ListBox2 and vice versa. When the form is posted I wan...

Is Using URL Rewritting Pivotal for Scaling a Larger App

I am currently working on a site which resembles a forum in its essential structure. I have decided not to opt for using one of the established PHP frameworks (I have played with Rails before), partially to learn, and also partially because I believe they hinder development in the long term. I wanted to know how important URL rewriting ...

Communication from child UIViewController to parent UIViewController

Hello, I haven't figured out that yet: I have a mainViewController that switches two views, viewControllerA and ViewControllerB. The way I switch the view is by having a UIButton (mainButton) in the mainViewController, and clicking on it switches viewControllerA <--> ViewControllerB. Now here is my problem. My ViewControllerA has a UIB...

Why, when I register my routes in an MVC test is NUnit sharing this across tests?

I am testing my routes in an mvc app. I have the following code: using System.Web.Routing; using MvcContrib.TestHelper; using NUnit.Framework; using web; using web.Controllers; namespace tests.web.Routes { [TestFixture] public class routeTests { [Test] public void Route_POSURL_MapsToPOSIndex() { ...

EntityCommandCompilationException

I'm new to "Linq to Entities" and i'm getting this error while passing data to the View (ASP.net MVC). I would like to know why is this happening and how can i fix that? ...

Zend Framework: how to add a new controller?

Dear All, I have the following problem. I am learning the Zend Framework. I have written my first simple application, and it works fine. It consists in an index page with some actions to edit a simple database. Now, I want to add another page: similar structure, different database. I want this second page to be reachable from the firs...

How do I scroll down to specified ID Tag on page load?

as title suggests. id string is passed to view as ViewData variable. ...

new to mvc, dividing code question

I'm brand new to the MVC coding style and i'm having trouble deciding if i placed my code in the right place. I have a list of rates for an item, the rates have various time frames. what i want to do is display the highest rate per item for the current day. so say if item 1 has 3 rates, and 2 of them overlap today, it will choose the hig...

Listing a list inside the list

I have list of book titles and I have to list chapters like this. Title 1 Chapter1 Chapter2 Chapter3 Chapter4 Title 2 Chapter1 Chapter2 So, I have list inside a list. I can get list of books (and titles) but when i reference their chapters i get nothing. well, how can I do that? <% foreach ...

Rhino Igloo vs. WCSF

Hi All, I'm trying to implement the MVP pattern on web forms. I have two options to go with, Rhino Igloo and WCSF. Which way you recommend to go with. BTW, ASP.NET MVC or MonoRails is not an option in my case. Cheers, ...

connect to DB using MVC

I have an asp.net mvc application and i need to connecto to the DB i have saw a tutorial video that connect to DB using wizard by adding DB connection and determine the DB and add a model but i need to know if i can use connection string and query the DB or calling procedures in DB ??? I need any tutorials or step by step article that ...

Null Reference Exception and the ?? Operator

I have a form within my Asp.Net MVC application which returns a Null reference exception at the following line, but only after postback errors: <%= Html.TextArea("Description", Model.Evt.Description ?? "")%> The string Description is indeed null, but my expectation was that if Model.evt.Description is null then "" will be shown in th...

Calling a modal window from within a custom UITableViewCell

I have a UITableView and inside it I create a custom UITableViewCell in the follwoing way: ItemCellController *cell = (ItemCellController *)[tableView dequeueReusableCellWithIdentifier:ContentListsCellIdentifier]; ... cell = [[[ItemCellController alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ContentListsCellIdentifier...

Asp.net MVC and normal html pages

Hi! I'm about to create quite simple website which will contain several static pages (they will never change) and one dynamic change (let's call it news). I'was wondering whether it's possible to use MVC here without having to create controllers and views for these "static" pages. Isn't that just too much overhead? Is there a way to mak...

Importing Model / Lib Class and calling from controller

I'm new to python and pylons although experienced in PHP. I'm trying to write a model class which will act as a my data access to my database (couchdb). My problem is simple My model looks like this and is called models/BlogModel.py from couchdb import * class BlogModel: def getTitles(self): # code to get titles here ...

.net mvc inline code anchor attribute

<a href="#" onclick="declineWindow(<%= Html.Encode(item.ConnectionRequestId) %>);">Decline</a> Can anybody explain why the inline code block doesn't work when I use it to populate the value of an attribute? Intellisense stops working and the page throws an error. If I move the block outside a the "a" tag then it works fine. ...

How do I handle multiple datasources?

I am working on a web application (PHP + Doctrine + MySQL) to sell. The problem is that there is information that the clients will need from my central data source and they will have information that they don't want me to see (financial and such). My Question, what is the best way to get that information to the customer application? My...

Is it better to set variable in the view or the controller in Zend Framework?

My question needs a bit of setup, so please bear with me: I became a convert to using View Helpers for getting data from a model rather than sprinkling it all over the controllers (hat tip to Eric Clemmons). It's much more reusable and flexible there. I just love it! What I usually do, is lay out the template in the index.phtml, and th...

What's the best way to refactor this Rails controller?

I'd like some advice on how to best refactor this controller. The controller builds a page of zones and modules. Page has_many zones, zone has_many modules. So zones are just a cluster of modules wrapped in a container. The problem I'm having is that some modules may have some specific queries that I don't want executed on every pag...

How do I maintain a $this reference across two classes in different scripts?

ok, that's a bit odd but here's the situation: I am working in an MVC context I have a User class used as a library(User.php) ANd then I have a controller class that handles input from the user(controller.php) Here's how it goes: user registers registerhandler() is called in controller registerhandler() calls register() method in U...