Subscribe to this Blog

Subscribe to this Blog

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

June 2008 - Posts

15
Comments

ASP.NET MVC Tip #12 – Faking the Controller Context by swalther

In this tip, I show you how to test ASP.NET intrinsics when building unit tests for an ASP.NET MVC application. I show you how to create a standard set of fake objects that enables you to fake the current user, the current user roles, the request parameters...
Filed under: , , ,
13
Comments

An Introduction to xUnit.net for ASP.NET MVC Developers by swalther

The purpose of this blog entry is to provide you with an introduction to the xUnit.net unit testing framework, the newest unit testing framework for the .NET framework. I want to demonstrate how you can use the xUnit.net framework when practicing test...
Filed under: , ,
9
Comments

ASP.NET MVC Tip #11 – Use Standard Controller Action Names by swalther

In this tip, I recommend that you use standard names for your controller actions in order to make your code more transparent to other developers. Adopting naming conventions makes your code easier to read for other developers and your future self. Naming...
Filed under: , ,
3
Comments

ASP.NET MVC Tip #10 - Prevent URL Manipulation Attacks by swalther

In this tip, Stephen Walther explains how hackers can steal sensitive information from an ASP.NET MVC website by manipulating URLs. I also discuss how you can build unit tests to prevent this type of attack by mocking the ControllerContext....
Filed under: , ,
12
Comments

ASP.NET MVC Tip #9 – Create a GridView View User Control by swalther

In this tip, Stephen Walther demonstrates how to build an ASP.NET MVC View User Control that accepts a set of database records and renders the records in an HTML table automatically. The advantage of using a View User Control is that you can customize the rendering of particular columns. ...
Filed under: , ,
11
Comments

ASP.NET MVC Tip #8 – Create an ASP.NET MVC GridView Helper Method by swalther

In this tip, Stephen Walther shows you how to extend the ASP.NET MVC framework with a new helper method that displays an HTML table of database data. ...
Filed under: , ,
11
Comments

ASP.NET MVC Tip #7 – Prevent JavaScript Injection Attacks with Html.Encode by swalther

In this tip, Stephen Walther convinces you that JavaScript Injection attacks are much more serious than you might think. I show you how to do very evil things with an ASP.NET MVC website using a JavaScript Injection attack and then I explain an easy way to prevent this type of attack. ...
5
Comments

ASP.NET MVC Tip #6 – Call RedirectToAction after Submitting a Form by swalther

In this tip, I explain why you should call the RedirectToAction() method after submitting form data instead of returning a view....
Filed under: ,
2
Comments

ASP.NET MVC Tip #5 – Create Shared Views by swalther

In this tip, I explain how to create shared views for controller actions. A shared view can be used with multiple controllers. In particular, I explain how to create shared views for displaying and editing database data. ...
Filed under: ,
4
Comments

ASP.NET MVC Tip #4 - Create a Custom Data Controller Base Class by swalther

In this tip, you learn how to create a custom controller base class that exposes actions for performing common database operations such as displaying, inserting, updating, and deleting data. ...
Filed under: ,
More Posts Next page »