Turning an ascx user control into a redistributable custom control

[Update 1/31/2011: I just attached a zip that demonstrates the files you’ll get at each step. In the process, I verified that the steps still work well with VS 2010]   This article applies to ASP.NET 2.0 and Visual Studio 2005. Background Since its early days, ASP.NET has always supported two different ways of authoring…


Dynamic Data screencast is now available!

I made a screencast which walks through a basic scenario of using ASP.NET Dynamic Data in a simple site using Northwind.  It’s about 17 minutes long.  Enjoy and feel free to give any feedback here or in the forum. AjaxFieldTemplates.zip


The MVC T4 template is now up on CodePlex, and it does change your code a bit

Short version: the MVC T4 template (now named T4MVC) is now available on CodePlex, as one of the downloads in the ASP.NET MVC v1.0 Source page. Go to T4MVC home page Poll verdict: it’s ok for T4MVC to make small changes Yesterday, I posted asking how people felt about having the template modify their code in…


A ‘Many To Many’ field template for Dynamic Data

Update: the Many to Many template is now part of the default Dynamic Data project template (when using Entity Framework), so you should not need to download this template separately unless you’re on 3.5SP1   Unlike Linq To Sql, Entity Framework directly supports Many to Many relationships.  I’ll first describe what this support means. In…


Turn your Razor helpers into reusable libraries

Note: the generator has evolved since this post. Although the post is still worth reading, please go to http://razorgenerator.codeplex.com/ for the most up to date doc. The first blog post I ever wrote was titled “Turning an ascx user control into a redistributable custom control”.  It was almost exactly five years ago, and it still gets a…


A new and improved ASP.NET MVC T4 template

Update: Please read this post for the newest and greatest. A couple weeks ago, I blogged about using a Build provider and CodeDom to generate strongly typed MVC helpers at runtime.  I followed up a few days later with another version that used T4 templates instead, making it easier to customize. And now I’m back…


Mind if my MVC T4 template changes your code a bit?

Update: Please see this post for what came out of this ‘poll’, and for a pointer to the newest T4 template on CodePlex. When working on my MVC T4 template, I was not able to use reflection to discover the Controllers and Actions, because the code that the template generates is itself in the same…


T4MVC 2.4 updates: settings file, sub view folders, ActionName support and more

To get the latest build of T4MVC: Go to T4MVC page on CodePlex This post is a continuation of various previous posts on the T4MVC template for ASP.NET MVC: A new and improved ASP.NET MVC T4 template The MVC T4 template is now up on CodePlex T4MVC 2.2 update: Routing, Forms, DI container, fixes I last…


Take your MVC User Controls to the next level

Note: this is based on ASP.NET MVC 2 RC, and will not work on earlier builds.   The quick pitch: make your User Controls as cool as built-in render helpers! The goal of this post is to show you how to change the way MVC user controls are called from something like this: <%= Html.Partial("~/Views/Shared/gravatar.ascx",…


A new flag to optimize ASP.NET compilation behavior

Update (9/04/2009) Actually downloading this fix for 3.5SP1 has been a confusing topic.  Here are links from which you can download it directly without having to call Product Support.  Note that even though the links appear to refer to an unrelated issue, the binaries do in fact contain this fix.  Sorry for the confusion! For…