Skin for programmatically added controls

Discussion in 'ASP .Net' started by schrader.it@t-online.de, May 21, 2008.

  1. Guest

    Hi,

    after searching hours and hours the net, didn't find any answer, i
    decided to ask the experts.
    I try to skin some controls, added within codebehind to the
    controlscollection of a panel.
    The sample:
    public partial class LayoutTest : System.Web.UI.Page
    {
    /// <summary>
    ///
    /// </summary>
    /// <param name="e"></param>
    protected override void OnInit(EventArgs e)
    {
    Control c = new Control();
    c.SkinID = "Default";
    panel.Controls.Add(c);
    }
    }
    The controls will show up within the panel, but without any skinning
    and theming. If i put them on the page directly (within the panel),
    everything works fine. Any suggestions?

    Regards Stephan
    , May 21, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bennett Haselton
    Replies:
    1
    Views:
    505
    John M Deal
    Nov 8, 2004
  2. RN
    Replies:
    4
    Views:
    846
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Feb 16, 2005
  3. Nomen Nescio
    Replies:
    2
    Views:
    2,057
    Sean M
    Jun 28, 2005
  4. Replies:
    8
    Views:
    479
  5. KMILO
    Replies:
    0
    Views:
    126
    KMILO
    Jan 15, 2007
Loading...

Share This Page