I've got a user control,ucAddress.ascx, which I reference twice on the
same page. On the first instance of the control I need to change the
skin of the table and it's textboxes to use specific skinids defined in
the theme for my site. How and where do I do this?
Here is the page calling the user control, profile.aspx:
<%@ Page debug="true" MasterPageFile="~/MasterPage_MOR.master"
Title="MOR Profile" Language="C#" StyleSheetTheme="MSB"
AutoEventWireup="true" CodeFile="profile.aspx.cs" Inherits="profile" %>
<%@ Register TagPrefix="Address" TagName="HomeAddr"
Src="~/controls/ucAddress.ascx" %>
<%@ Register TagPrefix="Address" TagName="BusnAddr"
Src="~/controls/ucAddress.ascx" %>
<asp:content ID="Content3" ContentPlaceHolderID="Main" runat="server">
<br />
<br />
<Address:HomeAddr ID="HomeAddr" runat="server" />
<br /><br /><br />
<Address:BusnAddr ID="BusnAddr" runat="server" />
<br /><br />
<asp:Button ID="btnUpdate" Text="Update Fictional Profile"
runat="server" />
</asp:content>
************************************************** **********
Here is the user control, ucAddress.ascx:
<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="ucAddress.ascx.cs" Inherits="ucAddress" %>
<asp:Table ID="tblAddr1" runat="server" BorderWidth="0" CellPadding="0"
CellSpacing="0">
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="lblAddrLine1" runat="server" Text="Line1"
Width="60px"></asp:Label>
</asp:TableCell>
<asp:TableCell>
<asp:TextBox ID="txtAddrLine1" runat="server"
Width="390px"></asp:TextBox><br />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
<asp:Table ID="tblAddr2" runat="server" BorderWidth="0" CellPadding="0"
CellSpacing="0">
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="lblAddrLine2" runat="server" Text="Line2"
Width="60px"></asp:Label>
</asp:TableCell>
<asp:TableCell>
<asp:TextBox ID="txtAddrLine2" runat="server"
Width="390px"></asp:TextBox><br />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
************************************************** *
Here is the skin from my MSB theme I'm trying to use for the tables in
the HomeAddr instance of the user control:
<asp:Table runat="server" SkinID="tblTest1" Font-Name="Verdana"
Font-Size="10px" ForeColor="DarkOliveGreen" />
Thanks,
Happy Wednesday,
Robert