473,382 Members | 1,646 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How to get current theme?

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
Nov 8 '06 #1
1 2872
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();
}
"Jeff" <it************@hotmail.com.NOSPAMwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
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

Nov 8 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: James Alba | last post by:
Hi all, being new to C# (not to C++), when I create a windows form and run it, regardless if the windows operating system is using the "new" XP theme or the "old" 95/98/2000 styled theme, my forms...
2
by: RCS | last post by:
I would've thought this would've been asked before, but I could find an answer anywhere. I have two Themes, I'd like to have a dropdown (which I can populate from the directory structure) - but...
1
by: Ron | last post by:
I have an application that requires a login at each visit to the site and can only be accessed by a login. A user can have different themes depending if it was assigned in there profile. Theme...
0
by: ThazKool | last post by:
I would like to use RegisterStartupScript to load some css from the current theme. How do I get the path to the current theme folder.
0
by: Vir | last post by:
Hi! Can anyone help me with this? I`ve searching on web but nothing found. The problem is: how can I change current system theme (Classic/Basic/Glass) in my C# project? For example: let's have...
11
by: greg | last post by:
Hi all, Is there a way to get the current theme name at design time? I'm trying to write a custom control for which I need to use images from the current theme. I have asigned a theme to the...
2
by: teo | last post by:
hallo, for a pop-up menu (it's a 'ContextMenuStrip' control) I 'd like to set the current System font Currently the ContextMenuStrip has the MS San Sarif font and the 8,25 size but I'd like...
1
by: Henry Stock | last post by:
I am having trouble referencing a theme in my ASP.NET project. I was following a model that allowed for multiple themes. So The theme that I have is stored in named "Base" under the App_Theme...
8
by: Mateusz Viste | last post by:
Hi, I'm not sure if my question is really related to JavaScript, so please excuse me if that's not the case (and maybe you guys would have an idea what's the cause is and where could I ask)... ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.