Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Psib3r 70 posts 119 karma points
    Mar 05, 2012 @ 10:10
    Psib3r
    0

    Macro's with ascx user controls

    I have a user control which i created a macro for.  just a very simple one to test something that does not seem to be working. The ascx page is simply this, and the code behind just adds a literal control, or that is the idea, the problem is, it does not seem to work, the literal control does not appear on the page.  is there an issue in using this?

    <asp:PlaceHolder ID="t1" runat="server"></asp:PlaceHolder>
    
    protected void Page_Load(object senderEventArgs e)
        {
          Literal l = new Literal();
          l.Text = "Hello, world!";
          t1.Controls.Add(l);
        }
  • Psib3r 70 posts 119 karma points
    Mar 05, 2012 @ 10:14
    Psib3r
    0

    sorry about the colours on the first bit, it should read

    <asp:PlaceHolder ID="t1" runat="server"></asp:PlaceHolder>
  • Psib3r 70 posts 119 karma points
    Mar 05, 2012 @ 13:01
    Psib3r
    0

    solved

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies