How do you create an object instance if all you have is the name of the class?
I want to add controls (derived from webcontrols) onto a webpage at runtime. Information is stored in a database, so all I know is the class name of the control, ie
Code:Public Class wssList Inherits System.Web.UI.WebControls.BulletedList Public Sub New() Me.Items.Add("Test 1") Me.Items.Add("Test 2") End Sub End Class Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim ctl As System.Web.UI.Control Dim str as String = "wssList" ctl = New ????????? Me.Forms.Controls.Add(ctl) End Sub




Reply With Quote