Generic Control Builder in ASP.Net

by Mwwhited 29. August 2009 12:08
In response to a question on StackOverFlow I posted a response about possibly using the ControlBuilder class in ASP.Net to get around the lack of generic control support in the ASP.Net designer.  While it may be possible to use the ControlBuilder to dynamically generate controls based on inputs.  Having it work as simply as a generic wrapper seem like it will require a pretty in-depth dive in reflection and the ASP.Net control model.  Because the person asking the question was pri... [More]

Tags: , ,

Programming

Invoking Generic Methods using Reflection

by Mwwhited 11. August 2009 10:08
Using reflection to create classes and invoke methods can be tricky. Worse still can when you try to invoke methods with generic arguments. This is a short and quick example static void Main(string[] args) { var flags = BindingFlags.Static | BindingFlags.NonPublic; var t = typeof(Program); var mi = t.GetMethod("Loopback", flags); var gargs = mi.GetGenericArguments(); var pargs = new object[] {"input value"}; var gargIn = pargs.Select(a =&g... [More]

Tags: , ,

Programming

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

RecentPosts

Badges