Subscribe to this Blog

Subscribe to this Blog

July 2008 - Posts - Stephen Walther on ASP.NET MVC

July 2008 - Posts

9
Comments

ASP.NET MVC Tip #18 – Parameterize the HTTP Context by swalther

Context is the enemy of testability. In this tip, I demonstrate how you can eliminate, once and for all, the HTTP Context from an ASP.NET MVC application. A controller action that interacts only with the set of parameters passed to it is very easy to...
Filed under: , ,
3
Comments

ASP.NET MVC Tip #17 – How to Run an ASP.NET MVC Application by swalther

In this tip, I explain the different options for running an ASP.NET MVC application from Visual Studio 2008. I recommend that you run an ASP.NET MVC application directly from the ASP.NET Development Web Server. An ASP.NET MVC application works differently...
Filed under: , ,
4
Comments

ASP.NET MVC Tip #16 – Create ASP.NET MVC Macros by swalther

In this tip, I show you how you can create a Visual Studio 2008 macro that creates a new MVC controller, view folder, and controller unit test with a single command. Don’t get me wrong. I like the Visual Studio 2008 designer tools. I like dragging...
Filed under: , ,
9
Comments

ASP.NET MVC Tip #15 – Pass Browser Cookies and Server Variables as Action Parameters by swalther

In this tip, I demonstrate how you can pass browser cookies and HTTP server variables to controller action methods in the same way as you can pass form and query string parameters. Imagine that you make the following browser request against an ASP.NET...
Filed under: , ,
14
Comments

ASP.NET MVC Tip #14 – Create a Template Helper Method by swalther

In this tip, you learn how to create and use templates in the MVC framework that you can use to display database data. I show you how to create a new MVC Helper method named the RenderTemplate() method. While I was back home in California during the 4...
Filed under: , ,
8
Comments

ASP.NET MVC Tip #13 – Unit Test Your Custom Routes by swalther

In this tip, I demonstrate how you can create unit tests for the routes in your ASP.NET MVC applications. I show how to test whether a URL is being mapped to the right controller, controller action, and action parameters. If you are being virtuous about...
Filed under: , , ,
More Posts « Previous page