asp.net - InstantiateIn and user controls -


i want add user control in instantiatein this:

public void instantiatein(control container)     {         pimvisualizer pimvisualizer = new pimvisualizer();         container.controls.add(pimvisualizer);         container.controls.add(new button() {text="asdf"});     } 

but control doeas not appear on page (the button does). control trivial, testing approach:

<%@ control language="c#" autoeventwireup="true" codefile="pimvisualizer.ascx.cs" inherits="pimvisualizer" %><asp:label id="label1" runat="server" text="uc"></asp:label> 

but still, why not text "uc" appear onthe page?

you have load usercontrols, not create them via constructor.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -