Archives
-
ASP.NET MVC Tip #40 - Don’t Cache Pages that Require Authorization
In this tip, Stephen Walther warns you to avoid making a mistake that can result in private data being displayed to unauthorized users.
-
ASP.NET MVC Tip #39 – Use the Velocity Distributed Cache
Improve the performance of ASP.NET MVC applications by taking advantage of the Velocity distributed cache. In this tip, I also explain how you can use Velocity as a distributed session state provider.
-
ASP.NET MVC Tip #38 – Simplify LINQ to SQL with Extension Methods
In this tip, Stephen Walther demonstrate how you can create new LINQ to SQL extension methods that enable you to dramatically reduce the amount of code that you are required to write for typical data access scenarios.
-
The Evolution of MVC
Take Model-View-Controller as an example. It's often referred to as a pattern, but I don't find it terribly useful to think of it as a pattern because it contains quite a few different ideas. Different people reading about MVC in different places take different ideas from it and describe these as 'MVC'. If this doesn't cause enough confusion you then get the effect of misunderstandings of MVC that develop through a system of Chinese whispers. – Martin Fowler, GUI Architectures (http://www.martinfowler.com/eaaDev/uiArchs.html)
-
ASP.NET MVC Tip #37 – Create an Auto-Complete Text Field
In this tip, Stephen Walther demonstrates how you can create an auto-complete text field in an MVC view by taking advantage of the Ajax Control Toolkit. He explains how you can create a custom Ajax Helper that renders the necessary JavaScript.
-
ASP.NET MVC Tip #36 – Create a Popup Calendar Helper
In this tip, Stephen Walther demonstrates how you can create a JavaScript popup calendar (date picker) that works within an ASP.NET MVC view. The calendar is created with the AJAX Control Toolkit.
-
New ASP.NET MVC Videos and Tutorials
15 new ASP.NET MVC videos were just published at the http://www.ASP.net/mvc website. The first 10 videos are basic tutorials on the ASP.NET MVC framework. If you haven’t had a chance to play with ASP.NET MVC yet, these tutorials are a great introduction.
-
ASP.NET MVC Tip #35 – Use the NHaml View Engine
In this tip, I explain how you can use the NHaml view engine as the view engine for an ASP.NET MVC application. I demonstrate how to create NHaml views that display both static content and database records. I also discuss how you can use master pages and user controls with the NHaml view engine.
-
ASP.NET MVC Tip #34 – Dispose of Your DataContext (or Don’t)
In this tip, I demonstrate how you can dispose of a DataContext within an ASP.NET MVC controller. Next, I argue that there is no compelling reason to do this.
-
ASP.NET MVC Tip #33 – Unit Test LINQ to SQL
In this tip, I demonstrate how to unit test the LINQ to SQL DataContext object by creating a Fake DataContext. You can perform standard LINQ to SQL inserts, updates, deletes and LINQ queries against the Fake DataContext.
-
ASP.NET MVC Application Building #2: Family Video Website – Add the Database
In this series of blog entries, I build an entire ASP.NET MVC application from start to finish. I create a Family Video Website that you can use to host home videos and photographs.
-
ASP.NET MVC Tip #32 – Repopulate Form Fields with ViewData.Eval()
When you need to repopulate the form data in an edit form, displaying both valid and invalid values, use ViewData.Eval() to retrieve the values from both the view data dictionary and the view data Model.
-
ASP.NET MVC Tip #31 – Passing Data to Master Pages and User Controls
In this tip, I discuss four strategies for passing data to Master Pages and User Controls. I explain how you can pass data by using a code-behind class, by using an action filter, by using method calls, and by using abstract controller base classes. I recommend the final strategy.
-
ASP.NET MVC Tip #30 – Create Custom Route Constraints
In this tip, I show how you can create custom route constraints that prevent you from accessing a URL unless you are local and authenticated. I show you how you can create a LocalConstraint and an AuthenticatedConstraint. I also demonstrate how you can test your custom constraints.
-
ASP.NET MVC Tip #29 – Build a Controller to Debug Your Custom Routes
In this tip, I demonstrate how you can create a special controller that you can use to test your custom routes. I also explain how you can give your routes back their names so you can more effectively unit test your routes.
-
ASP.NET MVC Application Building #1: Family Video Website – Upload the Videos
In this series of blog entries, I build an entire ASP.NET MVC application from start to finish. I create a Family Video Website that you can use to host home videos and photographs.
-
ASP.NET MVC Tip #28 – Test If Caching Is Enabled
In this tip, I demonstrate how you can test if the OutputCache attribute is present on a controller action. I also demonstrate how you can test if the OutputCache attribute is set with a particular duration.