Welcome to AspAdvice Sign in | Join | Help

Generic Web Controls and EnumDropDownList

I just published an article on ASPAlliance that shows a few different techniques for binding a DropDownList control in ASP.NET to an enumerated type (enum).  As part of the article, I wrote a custom control that uses generics to bind a DropDownList<T> to an enum.  Unfortunately, I ran into problems with declaratively defining this control within ASP.NET markup, and thus far there is no support from the ASP.NET engine for generic types within the markup (though it has been discussed here).  In response to my question about this support, Eilon Lipton blogged another approach that uses a ControlBuilder to allow specification of the proper control and its associated generic type within the ASP.NET markup, and is worth a read if this problem is of interest to you.  If you think Microsoft should standardize on some markup for generics within ASP.NET markup and support it in ASP.NET 4.0, please leave a comment, since I know they read this blog.

Published Wednesday, December 05, 2007 2:29 PM by ssmith
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Three Requests for ASP.NET 4 and VS 2010

I have three things that have been on my wish list for ASP.NET and/or Visual Studio that I'm curious

Sunday, March 16, 2008 4:24 PM by Steven Smith

Leave a Comment

(required) 
required 
(required) 
Enter the code you see below