mvc

AuthorizeAttribute injecting Repository

I have a custom authorizeattribute: RoleAuthorizeAttribute:AuthorizeAttribute i am overriding OnAuthorization method, however inside this RoleAuthorizedAttribute, i need to call a method in my repository class. I am using castle windsor for dependency injection. Here is my constructor: public RoleAuthorizeAttribute(IMembershipServ...

Silverlight WCF Service Bound to Grid - Grid is Blank ... am I missing something?

Here's my situation - I am starting my first SL application coming from a Windows background where I have the MVC pattern in place. I am thinking I can take advantage of tha pattern, so I jump right in to creating a SL application (solution) with 3 projects --> 1 holding my Model (business objects from before), SL app (automatically gen...

"Tool Has Timed Out" error using VS2008 Web Site Administration Tool

I am using the Visual Studio 2008 Web Site Administration Tool. I successfully configured it in one environment, but my second environment is not working. When I launch the tool, I get the error message immediately that the "Tool Has Timed Out". I have run the aspnet_regsql.exe to create the authentication db, and configured connection s...

ASP.NET Redirecting in a Base Controller

I have created a base controller which overrides Initialize and sets a cookie and saves some data in the DB. Here I also need to check if a cookie is set and if it is not redirect to an error page. Users of this site are coming from a store locater on another site which passes the store ID to me and I set it in a cookie. I need to make...

Which MVC framework in Perl has its own standalone server?

I am creating an automated testing framework in Perl for regression tests. I would like to post my results from the test machines. I have used django before where the server ran standalone with no installation needed. Which MVC framework in Perl has its own standalone server? Basically, which of the Perl MVC frameworks is closest to dja...

Strongly-Typed ASP.NET MVC with ADO.NET Entity Framework

I've finally gotten this working after days of struggle. I've got a simple database of People and Departments: I can use strongly-typed ASP.NET MVC views for reference/navigation properties! See the list of departments... Part of my Person/Edit view: <% using (Html.BeginForm()) {%> <%= Html.Hidden("Id", Model.Id) %> <fie...

How to fake Foreign Key Collections Properties in Entity Framework and ASP.NET MVC

In Alex James' blog post How to fake Foreign Key Properties in .NET 3.5 SP1, he explains how to add a Foreign Key property to an Entity Object. I've used that to get a reference/navigation property working with a DropDownList in a strongly-typed ASP.NET MVC application as explained here: Strongly-Typed ASP.NET MVC with ADO.NET Entity F...

Thickbox asp.net mvc

Hello guys, I've found awesome using thickbox with asp.net mvc ....but now i need to use it with ajax and then....it displays only a blank page. It is not loading the page inside of it. This happens only on the ajax call...that i'm doing like this <%= Ajax.ActionLink("GetFuncao", "GetFuncao?height=155&width=300&inlineId=hiddenModalCon...

Pass HTML from controller to view

Hello guys, I've made a structure to retrieve from database, based on the role given, to return menu itens. Now, I need to make a recursive method to render this HTML in the controller and pass this HTML to view. But i just don't know how to write native HTML in the controller. Any suggestions? ...

StructureMap controller factory and null controller instance in MVC

I'm still trying to figure things out with StructureMap and one of the issues i'm running into is my Controller Factory class blowing up when a null controller type is passed to it. This only happens when the application builds for the first time, after which every subsequent build works fine. Even when i shutdown Visual Studio and reope...

Cocoa Touch App Architecture - MVC controller?

I am quite new to Cocoa and to iPhone programming. I am using the Xcode Utility Application template to implement a simple app that has: a view with a text field to collect a username a view with a connect button to start a connection to a remote site using the username to get some data via HTTP. The data will be presented as a text ...

MVC, Dynamic routing, Unity, Determine if current controller exists in global.asax

What I'm trying to do is dynamic routing for my application. For instance, in Application_BeginRequest() I want to get the current controller and determine if it exists. If not, I want to add a set of routes that override the default routing so that my url looks like this mysite.com/term from database But, if the "term from databas...

Which data framework is better for an ASP.NET MVC site - LINQ to SQL or NHibernate

We're about to embark on some ASP.NET MVC development and have been using our own entity framework for years. However we need to support more than our entity framework is capable of and so I'd like to get some opinions about using MVC with a more robust framework. We have narrowed down or choices to either NHibernate (with the Fluent API...

ASP.NET MVC: Send email using SendAsync (System.Net.Mail)

Hello, is there any way in MVC to get the System.Net.Mail SendAsync to work, instead of the blocking Send method? I tried using it but hit the "Page starting an asynchronous operation has to have the Async attribute" error, which I obviously can't resolve (or can I?) because there is no ASPX page with an @Page directive where I could a...

Dictionary, enum or other alternative for implementing a priority of a task in MVC?

Hi, I have got a task table in my database with a priority field containing an integer value from 1 to 4 as a test. I am using a LINQ to SQL dbml file so I have a task class and I want to be able to display the text value of the priority to the user in my view, as a value in a select list. I have added the below code to my task class: ...

Next Full Release Date of ASP.NET MVC (MVC 1.1 / 1.5 / 2.0 anyone?)

Does anybody have an idea when the next version of ASP.NET MVC is scheduled for release? The Futures assembly has many features that are important (Asynchronous Controllers, invoke partial actions etc.), but I don't want to use beta/futures code in a production website - so, does anybody have an idea when the next version is about to co...

Does a controller create new views?

I'm working on a simple Java application. Currently, I have two view, one for login in and another once you're logged in. So my question is, once the user has logged in, should the controller of the login view creates the second view? The problem is, the first controller needs to know every dependencies of the second view... Edit : t...

Do something if view loads

Hi, I shift to my view by [[self navigationController] popToViewController:controller animated:YES]; In that ViewController, I'm not able to get a notice, that it comes back to front (e.g. by viewWillAppear). I want to reload a table, as soon as the view is visible again. How do I get a notice, that the view comes back on the scree...

ASP.Net MVC with web service as model?

Does anyone have advice or tips on using a web service as the model in an ASP.Net MVC application? I haven't seen anyone writing about doing this. I'd like to build an MVC app, but not tie it to using a specific database, nor limit the database to the single MVC app. I feel a web service (RESTful, most likely ADO.Net Data Services) is th...

Justification for MVC?

Hi guys, I was wondering if someone could provide me with some answers. I've been asking to swap our internal apps to an MVC architecture for quite a while now. Rails was absolutely shot-down as a toy, Struts is just too huge for the apps we do, Django's name makes these old folks nervous (oil & gas industry) but finally, finally Micr...