mvc

How to use dynamic master page in ASP.NET MVC RC 1.0

I don't know how to using dynamic master page in ASP.NET MVC RC 1.0. Please help! ...

Is there a better alternative to PureMVC for Flash projects?

I used PureMVC in a prior Flash (not Flex) project. After adjusting to its requirements, it worked well, but I'm left feeling that it was too over-engineered and cumbersome. I noticed that Mate had lots of positive reviews due to its clarity and simplicity, but it is only for Flex projects, not Flash. Would it be simpler/clearer to just...

Is ASP.NET MVC flexible?

Can it easily be combined with jQuery, (ASP.NET) Ajax, ASP.NET webforms, other frameworks. What about pulling dynamic code from ASP.NET MVC into for example classic ASP? Does the MVC model mean that it is easy to customize code? Background: I have some experience that it can lead to problems to integrate frameworks relying on Javascr...

In MVC, where is the correct place to put authorization code?

In MVC, where is the correct place to put authorization code? The controller? The Model? In the view? All over the place? ...

What's the best way to add a URL parameter to switch views with Zend Framework?

Hi, I'm developing a mobile site using Zend framework, and the site has two possible output formats (WML and XHTML). I'm using the same models and controllers, and then just setting which view to render with in the controller. At the moment, this is decided on by the HTTP Accept header. This needs to be definable in the URL as well. The...

Can an ASP.NET MVC View use a Model from a different project?

I've got an ADO.NET Entity Framework class called Node in a WPF project. I want to use it in a different ASP.NET MVC project within the same solution. My Node controller: Public Class NodeController Inherits System.Web.Mvc.Controller Function Display(ByVal id As Guid) As ActionResult Dim db As New WpfApplication1.Mod...

Inline Code on Webform Property

Why doesn't this display the date/time when rendered? <asp:Label runat="server" ID="test" Text="<%= DateTime.Now.ToString() %>" ></asp:Label> Is there anyway to make this work? ...

Separation of concerns; MVC; why?

I'm currently reading up on OO before I embark upon my next major project. To give you some quick background, I'm a PHP developer, working on web applications. One area that particularly interests me is the User Interface; specifically how to build this and connect it to my OO "model". I've been doing some reading on this area. One of...

ASP.Net MVC - strange params caching behaviour in Actions

I'm facing a strange problem in my project. My actions are getting old param values instead of the actual values which are in Request.Params. I created a HomeController.Echo(string text) action to illustrate it (see screenshot). When I call the action for the first time like "Home/Echo?text=aaa" everythink works fine. When I call the sam...

Does the concept of a Control make sense in MVC?

I've started using MVC reccently, and one thing that occurs to me is whether its possible for the concept of a Control to exist in MVC? From what I see the framework allows the application to be nicely factored into Models, Views and Controllers, but I can't think of a nice way to take a "vertical slice" of that application and reuse it...

EFExtensions With MVC ~ Materializer

I am using EFExtensions with a typed view in mvc and am getting The model item passed into the dictionary is of type 'Microsoft.Data.Extensions.Materializer`1+d__0[MvcCms.Web.Models.User]' but this dictionary requires a model item of type 'MvcCms.Web.Models.ViewData.SiteAdminModel'. 'MvcCms.Web.Models.ViewData.SiteAdminModel' contains...

html css in asp.net mvc default project

The default code shows the Home menu item aligned to the right. I changed the ul:menu and added attribute float:left to get the 'Home' menu too be aligned to the left of the page but to no avail. Is there way to show the 'home' menu to be on the left end of the page. I am trying to create a menu bar similar to SO as a learning project ...

How can I pass variables to a file included in a class in PHP?

So I'm working on my own little MVC framework as a learning exercise. It's working great, but I want to be able to reference variables in my view files without $this. So for example I have a controller object which instantiates a view object. From the controller I pass the variables to the view like this $this->view->foo = "bar"; The...

AJAX and the MVC pattern

Hi all. Please redirect me if a similar question exists.. I haven't been able to find anything, though I'm sure that my problem is fairly common... I have a page that has 5-6 divs that can be individually loaded through Ajax requests. Through a prototype ajax.request(), the server (php) echoes back the HTML code for the division before ...

Accessing the controller in a Cocoa application

I'm beginning to think that my Cocoa application is not really done according to the principles of MVC. My problem is the following: I have some classes in my project, one of called Copier.h and another called DropReciever.h. Copier is sort of my main view controller, as it has all the bindings and main methods. DropReciever is a custom...

ASP.NET MVC relative paths without breaking JavaScript IntelliSense?

Adding a script to a view generally involves something like this: <script src="../../Scripts/jquery-1.3.1.min.js" type="text/javascript"></script> Unfortunately, this doesn't work if the app is deployed in a virtual directory under IIS 6. The alternatives discussed here involve using Url.Content with "~" to resolve the path dynamicall...

How to determine which controller an action belongs in?

I have two models: releases have many elements, and elements belong to releases. The action I wish to define imports all elements (making copies of them all) from one release into another release. How do I determine if this action belongs as a member action on the releases controller, or a collection action on the elements controller?...

Securing an ASP.Net MVC Site

As a relative newcomer to both web and MVC, I am looking for a good summary of security best practices that I should implement. The site will be public facing with "moderately sensitive data" (meaning we can't get sued, but probably wouldn't make many friends if the data got out!) and will have the following security steps taken: a:...

MVC extension method

I'm trying to write a simple extension method that allows me to select an item in an MVC SelectList by text rather than value. This is what I came up with but although the item is set as selected while debuging, the returned SelectList has all it's items with selected = false. Any ideas? public static SelectList SelectByText(this Se...

Implementing MVC with Windows Forms

Where can I find a good example on how to completely implement the MVC pattern in Windows Forms. I found many tutorials and code examples on various sites (e.g. CodeProject, .NetHeaven) but many are more representative for the observer pattern than MVC. Since the application I want to develop is for a school project, I am reluctant to us...