asp.net-mvc

Route Links - Url.Action

I'm trying to return my links so they display as /Area_1419.aspx/2/1. I've managed to get that result in example 2 but I don't understand why it works, as I would exspect example 1 below to work. I don't see how Example 2 knows to go to the Area_1419 controller? Route routes.MapRoute( "Area_1419 Section", "Area_1419.aspx/{sec...

How to deploy ASP.NET MVC application in a shared hosting without losing the beautiful uri?

I am trying to upload an ASP.NET MVC application in a shared server running on IIS 6 and Windows 2003. I don't have access to IIS. I've changed the global.asax.cs file as follows: routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", "{controller}.aspx/{action}/{id}", ...

AjaxUploader Error using StructureMap controller factory

Hi, I have a ASP.NET MVC app and are evaluating the AjaxUploader. I am using StructureMap which uses its own controller factory instead of the default one for MVC. When I try to upload a file I get this error. The IControllerFactory 'Mylester.Web.StructureMapControllerFactory' did not return a controller for a controller named 'Uploa...

Is it possible to run ASP.NET MVC application on Cassini server?

Is it possible to run ASP.NET MVC application on UltiDev Cassini webserver? If so.. are there any drawbacks / things that I need to have in mind when building this app? ...

anybody seen some paypal IPN Listener for ASP.NET MVC

anybody seen some paypal IPN Listener code sample / implementation for ASP.NET MVC ...

Asp.net - MVC1 vs MVC2

hi, can any one precisely explain the difference between ASP.NET MVC1 vs MVC2.. and if i'm having a project in MVC1, how can i migrate it to MVC2 ? ...

Does the default MVC security utilize the same security as ASP.NEt

I am converting a personal site over to MVC 2 and I have been using Forms Authentication against a SQL Server DB. Curious if the standard MVC 2 template will just automatically work if I upload it to the server. I have added the connection string to the web.config. I'm thinking it will work but wanted to see if anyone's done this. ...

how to pass parameters to partial view to show db content?

I am getting my content from a database. How can i use partial views to show content on page using that database? database table: Content [Id, Content] these are 2 fields i want to get the content from db using partial views. How i will pass an id to a partial view and show the content in view page? ...

Html.RenderAction<MyController> - does not have type parameters

Hi, I'm trying to use RenderAction in the following way: '<% Html.RenderAction( x => x.ControllerAction() ); %>' as seen here: http://devlicio.us/blogs/derik_whittaker/archive/2008/11/24/renderpartial-vs-renderaction.aspx and here: http://eduncan911.com/blog/html-renderaction-for-asp-net-mvc-1-0.aspx but I keep getting an erro...

Asp.Net MVC2 RenderAction changes page mime type?

It appears that calling Html.RenderAction in Asp.Net MVC2 apps can alter the mime type of the page if the child action's type is different than the parent action's. The code below (testing in MVC2 RTM), which seems sensible to me, will return a result of type application/json when calling Home/Index. Instead of dispylaying the page, the...

How do I persist a value accross views

Completely new to asp.net mvc... completely new to web apps so bear with me... Lets say I have an Action on a controller that requires a specific piece of information, say an int Id value. A view is rendered from this Action. This view contains a button which will take the user off to a new Action on another Controller. On the view o...

Dynamic LINQ Group By Query in ASP.NET MVC

I'm wondering how to best tackle this, since what I have now works great for a hard-coded column in my view -- I'm wondering how I can extend it to allow the column to be dynamic. CONTROLLER: var dc = new DataContextDC(); return View(dc.items.Where(i=>i.IsPublic == true)); VIEW: <% foreach (var grp in Model.GroupBy(s => s.GroupColum...

Different users get the same cookie - value in .ASPXANONYMOUS

My site allows anonymous users. I saw that under heavy load anonymous users get sometimes profile values from other users. I first delete my cookies and get a valid unique value in the cookie value .ASPXANONYMOUS. After a couple of requests I get a new value for .ASPXANONYMOUS which is already used by another user. I see in my loggs tha...

Html.BeginForm PUT

It seems impossible to define PUT when I use Html.BeginForm to submit a form whilst updating an item. Is this correct? Thanks. Christian ...

which is the best place to implement data grouping in ASP.net MVC

I am trying to group a data collection and send it to the View where it needs another level of grouping I tried doing this in the Model level but looping throug the grouped collection becomes very difficult and determining the data type to pass to a partial is not easy Grouping at the View level looks easy to implement but I want to avo...

MVC repository pattern design decision

I have an asp .net MVC application and recently started implementing the repository pattern with a service validation layer, much like this. I've been creating one repository/service for each model that I create. Is this overkill? Instead, should I create one repository/service for each logical business area that provides CRUD for many ...

How to validate two properties with ASP.NET MVC 2

Hey folks :-) I'm just getting started with ASP.NET MVC 2, and playing around with Validation. Let's say I have 2 properties: Password1 Password2 And I want to require that they are both filled in, and require that both are the same before the model is valid. I have a simple class called "NewUser". How would I implement that? I'v...

How to Create A Document Type Definition

Hi Guys I've been creating a lot of my own custom attributes in my XHTML documents lately, and am aware that because they are custom attributes, they won't validate against the W3C standard. Isn't it true that I can specify my own DTD to make it validate? If so, can anyone tell me what's involved in doing this in an ASP.NET MVC app? T...

Where to execute extra logic for linq to entities query?

Let say that I want to populate a list of CustomerViewModel which are built based on Customer Entity Framework model with some fields (like Balance) calculated separately. Below I have code which works for lists - it is implemented in my service layer, but also I want to execute this code when I just get one item from the database and ex...

How do you link to an action that takes an array as a parameter (RedirectToAction and/or ActionLink)?

I have an action defined like so: public ActionResult Foo(int[] bar) { ... } Url's like this will work as expected: .../Controller/Foo?bar=1&bar=3&bar=5 I have another action that does some work and then redirects to the Foo action above for some computed values of bar. Is there a simple way of specifying the route values with Red...