November 2009 Entries

Dynamically Adding Web User Controls and Accessing Their Properties by Using Inheritance

So I came up with a way that I could finally dynamically load user controls, and access properties from them that I need for them to work. Here’s my post! The Problem: Web User Controls (.ascx files) are fantastic, because they are a breeze to set up, you can add properties, and then be on your way. They’re especially useful for controls that you really only need to use in 1 spot in the program, so it’s really hard to justify turning them into server controls. Their biggest downside is that when ......