asp.net-mvc

MVC way of handling data input

I have a data input module where I add the information of my product and its sub information like: product basic info product price info product price details price info and price details are related to product and are lists In my web forms approach I would store my main product object on the view state and I would populate it's prici...

First attempt at Linq to Sql in NerdDinner - Rule violations prevent saving

I'm trying to go through the NerdDinner example chapter from the ASP.Net MVC 1.0 and I've come across an error. Everything was hunky dory until I got to the part where I need to edit a dinner. I've followed the guide word for word from the creation of the project until this point (at least the best I can tell). However, when I call th...

Speed of code execution: ASP.NET-MVC versus PHP

I have a friendly argument going on with a co-worker about this, and my personal opinion is that a ASP.NET-MVC compiled web application would run more efficiently/faster than the same project that would be written in PHP. My friend disagrees. Unfortunately I do not have any solid data that I can use to back up my argument. (neither doe...

Html.RouteLink busted?

Why does this code produce these results? CODE: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl< RoomsAlive.ViewModels.ProductCatalogViewModel >" %> <div id="product_nav"> <ul> <%--ADD PREV TAB--%> <% if (Model.HasPreviousPage) %> <% { %> <li><%= Html.RouteLink("<<", "Catalog...

Large File uploading to asp.net MVC

I need a way to upload large files (600 mb to 4 gb) in an asp.net mvc website. Currently I am using swfupload; it works well enough, but it is a huge hit on the webserver because it sends it in one big upload, plus I have to set it in the web.config to allow that huge of a file, which is a huge security risk. In the past when I was doin...

How do I return errors from my asp.net mvc controller when doing a jquery ajax post?

Hi! I'm creating a website in ASP.NET MVC and have stumbled across something I really can't figure out. I've got a user profile page that allows a user to change his password. On the serverside, I want to validate that the user has entered a correct "current" password before allowing the change. What's the best way to return to my Vi...

MVC Create Artist which includes Contact data

I am fairly new to the MVC Framework and have spent the last few days/nights working through the tutorials. I have a loosely coupled design with Services and Providers and am using the Entity Framework. I am using all the latest software, Visual Studio 2008, .Net 3.5 Framework, MVC, Entity Framework. I'm trying to create a view Artist/C...

Problems with MVC Controllers + Dependency Injection (Ninject) in medium trust

I want to use dependency injection in an medium trust environment. To that aim I picked Ninject as Iv been told its light weight. How do I set-up injection into the controllers? When I tried to create a custom controller factory: public class NinjectControllerFactory : DefaultControllerFactory { private readonly IKernel...

How do i add Javascript to an ASP.NET MVC View?

Hi folks, simple question i'm sure (blush). I have a simple View and I wish to add a JQuery DatePicker javascript to this view (and not every view, via a masterpage). I'm not sure what is the best way to do this. Second, I'm conscience of where/when my Javascript loads. I'm a fan of YSlow and it recommends that i add any scripts to th...

Best way to share an ASP.NET MVC Azure project among 3 PCs?

I zipped an ASP.NET MVC Azure project up and copied it to another computer (both have VS 2008). I thought I could just unzip it in "Documents\Visual Studio\Projects", but I can't quite get it working. My site builds, but the browser doesn't see the master page or Site.css. Should moving projects around as Zip files just work? My re...

Things I cannot do in ASP.NET MVC

Are there some things I cannot do with ASP.NET MVC? Things that are only possible with ASP.NET WebForms, or extremely much easier with WebForms? We consider using ASP.NET MVC for a new project. But I wonder if there are some obvious things we will not be able to do with ASP.NET MVC when compared to WebForms, or places where we will h...

Telerik controls in ASP.NET MVC

Telerik claims their controls work with ASP.NET MVC now. Has anyone already used the controls in a MVC project? My company uses the Telerik ASP.NET controls in a large application and it works out quite well. That's why we think about using them in a MVC project. EDIT 1: telerik has a new go at ASP.NET MVC this looks much better then ...

whats an ideal candidate for asp.net mvc

is there any particular website that would make sense to use MVC versus webforms. what would be the decision process in deciding between these options? ...

ModelState without a field?

I've got a controller action like this: [ActionName("Create"), AcceptVerbs(HttpVerbs.Post)] public ActionResult Save([Bind(Exclude="Id")]Project project) { try { _projectRepository.Save(project); return RedirectToAction("Details", new { id = project.Id }); } catch (PropertyValueException ex) { ...

ASP.NET: Managing Users and Roles (CMS, Portal, etc?)

Hello, I am not sure how to phrase a good question, so I will just say what I am after! I have to retool a web application for our vendors and part of that requires restricting content on a vendor by vendor basis. Looking at ASP.NET (MVC) this seems easy enough using the built in Authorization Filters and the IPrincipal and IIdentity ...

New to web development. Skip WebForms and start with MVC?

I'm an experienced desktop client developer in FoxPro, and I've started learning C# in VS2008 for object oriented programming. At this point, I've never worked on web-based data access apps. In moving to .NET, I want to learn web-based programming rather than desktop client-based, and my focus will be conventional Line Of Business apps. ...

Using the repository pattern with Entity Framework (mvc storefront)

Hi, can anyone give a helping hand, I been watching the videos for the mvc storefront and have create my own website using these techniques i.e. DDD, Repository pattern but i wish to use Entity Framework. In the Interfaces it returns IQueryable but with the entity framework i should return ObjectQuery instead? - I will be using LINQ. ...

Assign a Javascript function to AjaxOptions OnSuccess property raise an error - ASP.NET MVC

Hi, I'm using the Ajax.ActionLink helper to generate a link to delete a record. This is the code: Ajax.ActionLink("Delete Image", "DeleteImage", new { id = item.Id }, new AjaxOptions { HttpMethod = "Delete", OnSuccess = "Test()" } ) I'm assign a Javascript function (Test()) to the OnSuces...

Whats the best way to provide alternative views of the same content

I have several pages, notably FAQ, testimonials, videos for which I want to provide an external partner with a link to. The content will be embedded inline on their site, or shown as a popup. This is for an ASP.NET MVC site. Desired bahavior : I need to specify a different 'mode', such as 'popup', or 'inline' for 'css-free' markup At ...

REST Url Structure - Can ID of Resource go before controller?

The standard template for ASP.NET MVC (and MVC in general) seems to be {controller}/{action}/{id}, however, on a project i'm currently working on i'm not sure if that is an appropriate structure. If for example I had an application that controlled a car, to me it would make more sense to me to have the structure below: {car-rego}/{con...