mvc

Context, Membership, Etc Null when using MVC on IIS7

I'm sure this must be something simple that I'm missing. I'm using MVC Routing in my Forms applicaiton for Url Routing. On most of the forms I access the Context, Membership, etc. On my dev machine and on IIS6 everything works fine. I'm just trying to get to work on IIS7 and no luck. The Routing works as it should, but anytime I try...

Using PHP variables in Javascript include files for view in MVC

Suppose I am using an MVC framework, and my views require Javascript files located in a file external to the view. My javascript located in the external file depends, however, upon a few PHP variables in my view. If I were to include the Javascript in a tag inside my HTML view, I could simply inject the PHP variables into the Javascript...

Spring MVC binding parameters to backing object

I am using Spring MVC and in my controller, I want to be able to automatically bind incoming parameters to my Java object. It seems like this should be pretty easy to do. The only wrinkle is that the incoming parameter names (e.g. "username") may not match up exactly with the field name in the java object (e.g. "name"). From the Spring ...

what do the terms formBackingObject and ModelAttribute mean in Spring MVC?

I guess I don't understand the difference between a "FormBackingObject" and a "ModelAttribute" in spring MVC. Seems like both gets initiated and populated by Spring with an incoming request. ...

Do DataAnnotations only work with EntityFramework/Linq2Sql Classes ?

Hi, Im using Preview 2 of the ASP .NET MVC Framework. Im trying out DataAnnotation attributes with my own NHibernate models but they dont seem to work. I was under the impression that the validation is supposed to get triggered by the model binding during a post. But even thou my model binds perfectly with wrong data supplied by me, t...

How to localize new 'posts' with ASP.net MVC

Im just starting with localization today and need some information. I have a project running in ASP.net MVC using .resx (global / local) files to place text based on the chosen language on the page. But this is premade/static content. How to do this for, for instance, new posts if you have a blog? Do you have to do it by loading differe...

For Iphone how to reference root view controller from currently loaded view, so view can be replaced/switched

I'm trying to switch a currently loaded view with a new one. I have 3 xib files and 3 sets of ViewControllerFiles. RootViewController loads correctly, and correctly loads HomeViewController. The line that errors currently is this [self.rootViewController.view insertSubview:gameController.view atIndex:1]; error: request for member 'v...

Duplicate entries

Hi there, I have created a universalrepository that takes the type passed to it and when I create data entry method, the entity is created fine, but when I create a linked entity to it, i get the base entity created again. Any ideas why? Details.. I have divided a specification into multiple tables to manage stuff... Now I have got a...

Designer-friendly views in Asp.Net MVC

I'm enjoying Asp.Net MVC and am looking to use it in an upcoming project. Part of the project, however, is an emphasis on being able to expose the project Views to designers for things like theming and so on. One problem I'm anticipating is that Asp.Net MVC views are rather developer-centric. I really don't want to have to educate design...

iPhone Utility App Design

I'm creating a "utility" type application with a main and flipside view, and an underlying "model" which the flipside view edits, and the main view "consumes". Following on from this question: http://stackoverflow.com/questions/263118/iphone-os-utility-app-flipside-view-and-main-view-communication My question is: where should the model...

Easy way to load HTML content from XML?

EDIT: What I mean is displaying the XML data through HTML, not trying to get HTML into XML. Is there a simple way to load content from XML into HTML? To give you an idea, here is my DTD for the XML files: <!DOCTYPE bookreport [ <!ELEMENT page (title,author,image?,section+)> <!ELEMENT title (#PCDATA)> <!ELEMENT author ...

Zend Framework, what $this->_forward is doing

Hello everyone, I would like someone to explain me what _forward is exactly doing, I cannot see if _forward is also rendering the attached view to the action or just executing the action. Also is it possible to pass argument to $this->action in a view script ? More generally my problem is how to code a confirmation page, let's say t...

How to do a stress test for asp.net application ?

I don't want to use the visual studio 2008 team suite, is there any other work around for this ? I know in iis resource kit, there is a application for testing this, but it's hard for me to config that, any one have some sample or procedure for testing that ? or any other suggestions will be appreciated. ...

callbacks in MVC

public function test(){ $data = ORM::factory('testdata')->find_all(); Table::factory() ->set_body_data($data) ->set_row_titles('id') ->set_column_titles(Table::AUTO) ->set_callback('format_row', 'row') ->render(true); $this->template->title = ''; ...

Html.BeginForm() type of extension.

Does anyone know the syntax for creating a custom HtmlHelperextension method which behaves like.. <% using (Html.BeginForm()) {%> <p>Loads of html stuff here </p> <% } %> I'm thinking of something along the lines of.... <% using (Html.BeginTable("Column Heading 1", "Column Heading 2")) {%> <% } %> Any ideas? Cheers, ETFairfax ...

MVC posted values

Hi Experts, In asp.net MVC application we have mechanism where, when we submit a form and if there is any problem with the values (validation fails), the form is displayed back maintaining old values. How does it happen ? Where are these values kept ? or they collected from FormCollection. Help will be apprititated. Regards Parminder...

What is an MVC framework and why is it necessary/useful?

I know that an MVC framework allows you to separate business logic, data base access and presentation, but why do we need a framework to do this. Can't we just keep our classes separated, perhaps using different packages/folders for the model, view and controller classes? ...

Controller must have access to model and view. Model must have access to controller and view. View must have access to controller and model. Look what happens!

<? class Launcher { function launch() { new Controller(); } } class Controller { function __construct () { if(!is_object($this->Model)) $this->Model = new Model(); if(!is_object($this->View)) $this->View = new View(); } } class Model { function __construct () { if(!is_object($this->Controlle...

Where can I find a simple ASP.NET MVC (C#) tutorial(s)?

I am coming from a PHP background and I am familiar with OOP concepts, but I am moving away from PHP and trying out ASP.NET MVC using C#. Even without being forced to use web forms, this is a big jump for me coming from PHP. This is worsened by the fact that there are not very many tutorials out there on this subject in comparison to P...

Windows CWnd::OnLButtonDown not called as expected on double click

I'm developing an interactive MFC application which displays a 3D object using my own algorithm, essentially using MFC as a framework, but using lots of pDC->Polygon(), pDC->Rectangle(), pDC->DrawText(), etc. calls. The UI has numerous clickable areas which all work well. However, the onscreen controls for rotating, spinning, etc. the ...