Archives
-
An Introduction to xUnit.net for ASP.NET MVC Developers
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-driven development. In particular, I focus on using xUnit.net when building an ASP.NET MVC application.
-
ASP.NET MVC Tip #11 – Use Standard Controller Action Names
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.
-
ASP.NET MVC Tip #10 - Prevent URL Manipulation Attacks
In this tip, I explain 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.
-
ASP.NET MVC Tip #9 – Create a GridView View User Control
In this tip, I show you 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.
-
ASP.NET MVC Tip #8 – Create an ASP.NET MVC GridView Helper Method
In this tip, you learn how to extend the ASP.NET MVC framework with a new helper method that displays an HTML table of database data.
-
ASP.NET MVC Tip #7 – Prevent JavaScript Injection Attacks with Html.Encode
In this tip, you learn 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.
-
ASP.NET MVC Tip #6 – Call RedirectToAction after Submitting a Form
In this tip, I explain why you should call the RedirectToAction() method after submitting form data instead of returning a view.
-
ASP.NET MVC Tip #5 – Create Shared Views
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.
-
ASP.NET MVC Tip #4 - Create a Custom Data Controller Base Class
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.
-
ASP.NET MVC Tip #3 – Provide Explicit View Names when Unit Testing
In this tip, Stephen Walther explains how you can unit test whether a controller action returns a particular view. He recommends that you be explicit about view names when you plan to create unit tests.
-
ASP.NET MVC Tip #2 - Create a custom Action Result that returns Microsoft Excel Documents
In this tip, I show you how to create a custom action result that you can return from an ASP.NET MVC controller action. This action result generates a Microsoft Excel Document from a LINQ to SQL query.
-
ASP.NET MVC Tip #1 - Create New HTML Helpers with Extension Methods
In this tip, I show you how you can create two new HTML Helpers that you can use within an ASP.NET MVC View. I show you how you can use extension methods to create new HTML Helpers for displaying bulleted and numbered lists.
-
TDD : Introduction to Moq
In this post, I provide an introduction to Moq which is the newest of the Mock Object Frameworks. Moq is promoted by its creators as easier to learn and use than other Mock Object Frameworks such as Rhino Mocks and TypeMock Isolator.
-
ASP.NET MVC Book List
I've been collecting book recommendations on software design principles and patterns, test-driven development, and agile development. I wanted to share my current reading list with you in case you are interested in learning more about these topics. If you have any additional book recommendations -- please share!
-
I’m Now Working at Microsoft
It’s official, I’m now working at Microsoft. I have an office in building 42 and they have supplied me with a phone, an email account, and a computer. I even have a whiteboard in case inspiration hits me (it currently is blank).