D
David Freeman
Hi There!
I'm having trouble dynamically adding custom controls. My custom controls
does not use code-behind but only <script /> block for programming. So as a
result, I don't need to compile my custom controls to dll for them to work.
But I wonder, if I don't compile to dll, can I still dynamically add that
custom control? If so how? Below is how I've tried (and failed).
At top of the page...
<%@ Register TagPrefix="MyControls" Src="DynamicTest.ascx"
TagName="DynamicTest" %>
In the <script /> block...
Sub Page_Load(Sender As Object, e As EventArgs)
Dim objNew as New DynamicTest '<< Raised Error: BC30002: Type
'DynamicTest' is not defined
Controls.Add(objNew)
End Sub
What I'm doing wrong here? I'm really hitting my head against the wall. Plz,
anyone could help, I really appreciate it!
David
I'm having trouble dynamically adding custom controls. My custom controls
does not use code-behind but only <script /> block for programming. So as a
result, I don't need to compile my custom controls to dll for them to work.
But I wonder, if I don't compile to dll, can I still dynamically add that
custom control? If so how? Below is how I've tried (and failed).
At top of the page...
<%@ Register TagPrefix="MyControls" Src="DynamicTest.ascx"
TagName="DynamicTest" %>
In the <script /> block...
Sub Page_Load(Sender As Object, e As EventArgs)
Dim objNew as New DynamicTest '<< Raised Error: BC30002: Type
'DynamicTest' is not defined
Controls.Add(objNew)
End Sub
What I'm doing wrong here? I'm really hitting my head against the wall. Plz,
anyone could help, I really appreciate it!
David