Skinnable User Controls?

Discussion in 'ASP .Net Building Controls' started by Andrew Clancy, Jan 19, 2006.

  1. Hi,

    I'm hoping to create a skinnable user control in ASP.Net, using the skin
    file to keep things streamlined & all in one place/technique. 1st attemp
    went something like this
    Test.ascx:
    <%@ Control Language="C#" AutoEventWireup="true" CodeFile="Test.ascx.cs"
    Inherits="Test" EnableTheming="true" %><asp:TextBox ID="TextBox1"
    runat="server"></asp:TextBox><asp:Button ID="Button1" runat="server"
    Text="Button" />
    Default.skin:
    <%@ Register Src="~/Test.ascx" TagName="Test" TagPrefix="uc1" %>
    <uc1:Test runat="server" />
    Error Message: The control type 'ASP.test_ascx' cannot be themed

    Anyone got any ideas if this is possible, and/or any examples references on
    how?
    Ideally I want to be able to do something like this so I can completely
    customise the html/layout.

    <%@ Register Src="~/Test.ascx" TagName="Test" TagPrefix="uc1" %>
    <uc1:Test runat="server" ><template><asp:TextBox ID="TextBox1"
    runat="server"></asp:TextBox><asp:Button ID="Button1" runat="server"
    Text="Button" /><template></uc1:Test>

    Cheers,
    Andy C
     
    Andrew Clancy, Jan 19, 2006
    #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. Andrew Clancy

    Skinnable User Controls?

    Andrew Clancy, Jan 19, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    560
    Andrew Clancy
    Jan 19, 2006
  2. Daniel Bickett

    Skinnable/Stylable windows in wxPython?

    Daniel Bickett, Dec 12, 2004, in forum: Python
    Replies:
    5
    Views:
    469
    Roel Schroeven
    Dec 22, 2004
  3. Faizan Ahmed
    Replies:
    1
    Views:
    299
    John Saunders
    Jan 4, 2005
  4. Faizan Ahmed
    Replies:
    1
    Views:
    376
    John Saunders
    Jan 4, 2005
  5. Andrew Clancy

    Skinnable User Controls?

    Andrew Clancy, Jan 19, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    105
    Andrew Clancy
    Jan 19, 2006
Loading...

Share This Page