How to get current theme?

  • Thread starter Thread starter Jeff
  • Start date Start date
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
 
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();
}
 
Back
Top