(v 2.0) MasterPage for UserControl

S

Sergio Pereira

Hi there.
I have a bunch of UserControls on my site that look very much alike, with
some surrounding markup and images. Can I use MasterPages for that (I guess
not) or something similar ? I think skins would not do it but I'd be happy
to be proven wrong. Here are two extremely simplified examples of the
controls I have:

<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="FirstControl.ascx.cs" Inherits="FirstControl" %>
<table class="someclass">
<tr><td background="someImage.gif"><img src="logo.gif"></td></tr>
<tr>
<td class=otherClass>
This TD holds the part that varies in each control.<br>
<asp:label id=somelabel runat=server /> etc...
</td>
</tr>
</table>

<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="SecondControl.ascx.cs" Inherits="SecondControl" %>
<table class="someclass">
<tr><td background="someImage.gif"><img src="logo.gif"></td></tr>
<tr>
<td class=otherClass>
Some other thing here
<asp:TexBox runat=server />
</td>
</tr>
</table>

Any advice ?

Thanks
- Sergio
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,691
Members
48,796
Latest member
Greg L.

Latest Threads

Top