asp.net-mvc

Can I generate ASP.NET MVC routes from a Sitemap?

I'm thinking of learning the ASP.NET MVC framework for an upcoming project. Can I use the advanced routing to create long URLs based on the sitemap hiearachy? Example navigation path: Home > Shop > Products > Household > Kitchen > Cookware > Cooksets > Nonstick Typical (I think) MVC URL: http://example.com/products/category/NonstickCo...

How do I get rid of Home in ASP.Net MVC?

I know this site is written using ASP.Net MVC and I do not see "/Home" in the url. This proves to me that it can be done. What special route and do I need? ...

Entity diagrams in ASP.NET MVC

What's the best way/tool to display nice diagrams with entity relationships in ASP MVC views? I.e. servers and and applications, or servers with other servers. Are there any third party tools out there that can do this? I've been searching around things like Telerik, but it's really hard to google for this! ...

How do I handle page flow in MVC (particularly asp.net)

If you had to provide a wizard like form entry experience in mvc how would you abstract the page flow? Thanks ...

What's the best way to implement field validation using ASP.NET MVC?

I am building a public website using ASP.NET, as part of the deliverable I need to do an Admin Site for data entry of the stuff shown in the public site, I was wondering what techniques or procedures are people using to validate entries using ASP.NET MVC. ...

Creating your own table with CommandArgument buttons in ASP.NET MVC

Hi, I'm trying to implement something like this: <div> <table> <thead> <tr> <td>Port name</td> <td>Current port version</td> <td>New port version</td> <td>Update</td> </tr> </thead> <% foreach (var ip in Ports) { %> ...

What is the best way to gzip and cache static images in Asp.net mvc

I'm trying to find the best way to speed up the delivery of the static images that compose the design of an mvc site. The images are not gzipped, nor cached in the server or on the client (with content expire). Options are: Find why images are not cached and gzipped direcly from IIS6 Write a specialized http handler Register a special...

MVC .Net - The best way to write a form?

What is the the best way to write a form to submit some data in asp.net MVC? Is it as Scott Gu demonstrates here? Are there better approches? Perhaps with less using of strings? ...

Using ASP.NET MVC, how to best avoid writing both the Add View and Edit View?

The Add view and the Edit view are often incredibly similar that it is unwarranted to write 2 views. As the app evolves you would be making the same changes to both. However, there are usually subtle differences. For instance, a field might be read-only once it's been added, and if that field is a DropDownList you no longer need that Li...

Asp.net MVC User Control ViewData

When a controller renders a view based on a model you can get the properties from the ViewData collection using the indexer (ie. ViewData["Property"]). However, I have a shared user control that I tried to call using the following: return View("Message", new { DisplayMessage = "This is a test" }); and on my Message control I had this...

Best TinyMce editor Image Manager / File upload for Asp.net Mvc

What is the best Image Manager to integrate in TinyMce editor apart the official Moxiecode commercial ones? I'm looking to integrate a light texteditor in an asp.net mvc application and I choosed the Tinymce solution (and not the classic FCKEditor as this seems more lightweight and more jquery friendly). Sadly TinyMce doesn't come with...

Views in separate assemblies in ASP.NET MVC

I'm trying to create a webapplication where I want to be able to plug-in separate assemblies. I'm using MVC preview 4 combined with Unity for dependency injection, which I use to create the controllers from my plugin assemblies. I'm using WebForms (default aspx) as my view engine. If I want to use a view, I'm stuck on the ones that are ...

Catch Exception when non-existant controller is requested

I want to be able to capture the exception that is thrown when a user requests a non-existant controller and re-direct it to a sweet 404 page. How can I do this? For example, the user requests http://www.nosite.com/paeges/1 (should be/pages/) they get re-directed to the 404 rather than the nasty exception screen of death? ...

ASP.Net MVC and nUnit

I have nUnit installed. I have VS2008 Team Edition installed. I have ASP.Net MVC Preview 4 (Codeplex) installed. How do I make Visual Studio show me nUnit as a testing framework when creating a new MVC project? At this point I still only have the Microsoft Testing Framework as a choice. Update: I installed nUnit 2.5, but still wit...

ASP.NET Tutorials

Hi, can you recommend some good ASP.NET tutorials or a good book? Should I jump right to ASP.NET MVC/html/javascript or learn web forms first? Thanks ...

Experiences Using ASP.NET MVC Framework

I am wondering what experiences people are having using the ASP.NET MVC Framework? In particular I am looking for feedback on the type of experience folks are having using the framework. What are people using for their view engine? What about the db layer, NHibernate, LINQ to SQL or something else? I know stackoverflow uses MVC, so p...

From Monorail to ASP.Net MVC

The last time I took on a non-trivial .Net/C# application I used Castle Monorail and, on the whole, enjoyed the experience. Early-access/preview releases of .Net MVC were not yet available. Many "Microsoft shops" will now find the "official" solution more appealing. Has anyone gone from Monorail to .Net MVC. How did you find the switch...

asp.net mvc - subfolders

How does the new Microsoft asp.net mvc implementation handle partitioning your application - for example: --index.aspx --about.aspx --contact.aspx --/feature1 --/feature1/subfeature/action --/feature2/subfeature/action I guess what I am trying to say is that it seems everything has to go into the root of the views/controllers folders ...

Best way to unit test ASP.NET MVC action methods that use BindingHelperExtensions.UpdateFrom?

In handling a form post I have something like public ActionResult Insert() { Order order = new Order(); BindingHelperExtensions.UpdateFrom(order, this.Request.Form); this.orderService.Save(order); return this.RedirectToAction("Details", new { id = order.ID }); } I am not using explicit par...

Should I migrate to ASP.NET MVC?

Hello, I just listened to the StackOverflow team's 17th podcast, and they talked so highly of ASP.NET MVC that I decided to check it out. But first, I want to be sure it's worth it. I already created a base web application (for other developers to build on) for a project that's starting in a few days and wanted to know, based on your ex...