0

When to use TempData in ASP.NET MVC

Posted by Tim on December 5, 2011 in MVC

The problem I came across this problem where I had a basic list of items and for each if these items I wanted to add a delete action on my controller. I wanted to add some error checking around the delete action so if someone attempted to modify the URL and enter a incorrect parameter [...]

Tags: ,

 
1

Areas and ASP.NET MVC Routes Tip

Posted by Tim on August 28, 2011 in MVC

Lets say that you have several areas define in your ASP.NET MVC solution. You find that when you run your application you get the following error “Multiple types were found that match the controller named ‘Home’.”. This is because ASP.NET MVC finds all the routing definitions (i.e in each area.cs file or the global.asax) and [...]

Tags: , , ,

 
0

Elmah and MVC 3 Error Handling

Posted by Tim on July 12, 2011 in ASP.NET, MVC

I came into an issue where I have Elmah configured on a ASP.NET MVC 3 website. I notice that the errors were not getting logged or emailed as per my configuration settings in web.config. I found that MVC3 Error Handling was handling all the errors before Elmah could handle the error and report it correctly. [...]

Tags:

 
0

handling multiple submit buttons in one form (asp.net webforms)

Posted by Tim on May 6, 2011 in ASP.NET

I came across an issue where I had the following setup with an asp.net website: I had a master page with one main form element I had a submit button in the master page which acts as a search button across the website I had a login page that also has a submit button Naturally [...]

Tags: , ,

 
0

Compiler Error Message: CS1973

Posted by Tim on February 6, 2011 in MVC

I came across this error when I was trying to use the @Render method to render a view while passing through a object that will act as the model for that view. Compiler Error Message: CS1973: ‘System.Web.Mvc.HtmlHelper’ has no applicable method named ‘Render’ but appears to have an extension method by that name. Extension methods [...]

Tags: ,

 
1

Disabling Request Validation with ASP.NET MVC

Posted by Tim on February 1, 2011 in C#, MVC

Sometimes when dealing with POSTS and form data, you need to disable Request Validation to allow HTML/scripting data into your methods.   Traditionally with Web Forms you use <%@ Page ValidateRequest=”false” %> which turns off Request Validation, just be aware that this doesn’t work with ASP.NET MVC. You apply the [ValidateInput] attribute to the controller action [...]

Tags:

 
0

A CMS that integrates into ASP.NET MVC

Posted by Tim on April 13, 2009 in .NET Framework, ASP.NET, C#, Open Source

Here is a open source CMS called N2 that provides a CMS framework to build web applications on using the ASP.NET MVC Model.   Its a very basic CMS, but it provides all the core functionality including Pages, Articles and a .NET Permissions Model (it also has some add ons and allows developers to contribute their [...]

Tags: ,

 
0

Using ASP.NET MVC on IIS6 or below

Posted by Tim on January 13, 2009 in .NET Framework, ASP.NET, C#

When you are building a web applicatio using the ASP.NET MVC framework on IIS7, it URL routing works smoothly and without any dramas.   But when it comes to IIS6 you have to make a comprimse especially if you are developing web apps within a shared hosting envoirnment.   I found the easist way is to change [...]

Tags: , ,

Copyright © 2008-2012 Codelab Blog All rights reserved.
Desk Mess Mirrored version 1.9.1 theme from BuyNowShop.com.