Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Skin for programmatically added controls

Reply
Thread Tools

Skin for programmatically added controls

 
 
schrader.it@t-online.de
Guest
Posts: n/a
 
      05-21-2008
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gridview controls added programmatically does not appear later KMILO ASP .Net Web Controls 0 01-15-2007 02:20 PM
Programmatically added controls losing state mark.norgate@gmail.com ASP .Net 8 08-17-2006 10:20 AM
Data and controls from dynamically added controls is rmoved on Submit David Hubbard ASP .Net 2 01-17-2006 06:52 PM
basic: asp.net user controls: how to programmatically add attribute to all text box controls? ASP .Net 4 11-09-2005 02:14 AM
user controls: dynamiclly added child controls dont survive post back ? Wolfgang Brucker ASP .Net Building Controls 1 01-14-2004 09:13 PM



Advertisments