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
Post a Comment