How to get current theme?

J

Jeff

Hey

ASP.NET 2.0

In my website project the Default.aspx page contains this image:
<asp:TableRow>
<asp:TableCell>
<asp:Image ID="imgBar" runat="server" ImageUrl="~/Network/Bar.aspx"
/>
</asp:TableCell>
</asp:TableRow>

In the Bar.aspx I need to test on what theme Default.aspx currently are
using

Any suggestions on how I could from within Bar.aspx get info about the theme
Default.aspx currently is using?

Jeff
 
J

Jeff

I solved it

I created a new class which inherit from System.Web.UI.Page, and made both
aspx pages inherit from my custom class.

In my custom class I added a custom method:
protected string GetCurrentTheme()
{
return this.Theme.ToString();
}
 

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
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top