473,748 Members | 2,502 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

question about theme

Ben
Hi,

I'm testing theme and dtylesheettheme properties of 'Page' like this:
('test' is a directory of App_Themes).

Protected Sub Page_PreInit(By Val sender As Object, ByVal e As
System.EventArg s) Handles Me.PreInit
'Page.Theme = "test"
Page.StyleSheet Theme = "test"
End Sub

With Page.Theme, no problem, but with Page.Stylesheet Theme, i get the error:
"The StyleSheetTheme property cannot be set, please override the property
instead"
When putting it into the aspx file, it works:
<%@ Page Language="VB" StylesheetTheme ="test" CodeFile="theme .aspx.vb"
Inherits="theme " %>

How to correct that?
Thanks
Ben

Mar 14 '07 #1
4 3328
On Mar 14, 9:29 am, "Ben" <b...@mail.dewr ote:
>
With Page.Theme, no problem, but with Page.Stylesheet Theme, i get the error:
"The StyleSheetTheme property cannot be set, please override the property
instead"

Ben, check the last post here:
http://forums.asp.net/thread/999603.aspx

Mar 14 '07 #2
Ben
Hi Alexey, thaks for replying.

I found this in your link:
public override string StyleSheetTheme
{
get{ retrun "MyStyleSheetTh eme"; }
}

It's C# and I translated it into:
public override StyleSheetTheme () as string
get
return "test"
end get
end property

but i can't put it into event PreInit nor in Page OnLoad, so where do i have
to put it and how to link it to the code-behind file?

Thanks

"Alexey Smirnov" <al************ @gmail.comschre ef in bericht
news:11******** **************@ y66g2000hsf.goo glegroups.com.. .
On Mar 14, 9:29 am, "Ben" <b...@mail.dewr ote:
>>
With Page.Theme, no problem, but with Page.Stylesheet Theme, i get the
error:
"The StyleSheetTheme property cannot be set, please override the property
instead"


Ben, check the last post here:
http://forums.asp.net/thread/999603.aspx

Mar 14 '07 #3
On Mar 14, 11:15 am, "Ben" <b...@mail.dewr ote:
Hi Alexey, thaks for replying.

I found this in your link:
public override string StyleSheetTheme
{
get{ retrun "MyStyleSheetTh eme"; }

}

It's C# and I translated it into:
public override StyleSheetTheme () as string
get
return "test"
end get
end property

but i can't put it into event PreInit nor in Page OnLoad, so where do i have
to put it and how to link it to the code-behind file?
As I understood this post
http://www.vikramlakhotia.com/Dynami...aspnet_20.aspx

your page has to be inherited from, say, "basewebpag e" which inherits
from System.Web.UI.P age and then StyleSheetTheme has to be placed in
basewebPage

I found also another interesting post, take a look at
http://weblogs.asp.net/scottgu/archi...ASP.NET--.aspx

Mar 14 '07 #4
Ben
Ok, thanks ...

"Alexey Smirnov" <al************ @gmail.comschre ef in bericht
news:11******** *************@e 65g2000hsc.goog legroups.com...
On Mar 14, 11:15 am, "Ben" <b...@mail.dewr ote:
>Hi Alexey, thaks for replying.

I found this in your link:
public override string StyleSheetTheme
{
get{ retrun "MyStyleSheetTh eme"; }

}

It's C# and I translated it into:
public override StyleSheetTheme () as string
get
return "test"
end get
end property

but i can't put it into event PreInit nor in Page OnLoad, so where do i
have
to put it and how to link it to the code-behind file?

As I understood this post
http://www.vikramlakhotia.com/Dynami...aspnet_20.aspx

your page has to be inherited from, say, "basewebpag e" which inherits
from System.Web.UI.P age and then StyleSheetTheme has to be placed in
basewebPage

I found also another interesting post, take a look at
http://weblogs.asp.net/scottgu/archi...ASP.NET--.aspx

Mar 14 '07 #5

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

Similar topics

3
1536
by: pnp | last post by:
Hi all, Could I use an external dll (that windows also use for it's themes) from which my application could load it's graphics at runtime? Basically I wan't to be able to select the styles for my application without changing the windows general appearance. Thanks, Peter.
0
3049
by: Chenghui Li | last post by:
We have a problem with the Windows XP theme: We have a IDE which allows other developers to develop visual programs for their customers. Our IDE allow them to set font for window captions easyly (through a dialog). It works fine fo W98, 2000, NT, and XP is the theme is Classic. But on XP if the theme is "Windows XP", the we have a problem: if the developer set the caption font to be say, "Script" (and all non-default font), then the...
1
1274
by: Patrick.O.Ige | last post by:
Any ideas how to have users select different color for a website in ASP.NET? Any artticles would be appreciated!
1
2241
by: kfc1976 | last post by:
Hi All, First of all, following are the facts 1) I've been trying to solve the following issue for the past 8 hours (Not Kidding) 2) If I can't find the answer, It will drive me completely crazy Platform: XP Pro, .net 2.0 FrameWork, Visual Studio 2005 Problem Regarding:
5
1740
by: | last post by:
I want to define a style that automatically associates a specific image with certain IMG elements. Is there a way to do this with ASP.NET? If I use an ASP.NET image control and specify a class that has a src property specified, it doesn't seem to do anything. Thanks. Jerry
1
8004
by: Joey | last post by:
Hello, I have tried to programmatically set the theme for my master page by putting code in a "Page_PreInit" fuction in the master page's code behind. However, when I set a breakpoint there and run the app, the breakpoint is never hit. Of course my theme is not being applied. The above procedure works fine for any content page, but obviously doesn't work for my master page. So, how does one properly and programmatically set a theme...
1
1758
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 A is considered the default theme for the site But different users can have different themes. User A has Theme A User B has Theme B Logs in sees Theme A During Login sees Theme A after login sees Theme B
0
1771
by: =?Utf-8?B?SGFyZHkgV2FuZw==?= | last post by:
Hi all, I am building a web site with theme support, under each theme's folder there are some images. Some of my images need to be skinned, I know I can build a skin file with line like <asp:Image runat="server" ImageUrl="images/email.gif" skinid="Email" BorderWidth="0" /> Then in my master page or web page I can call this skin like
11
6529
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 page as well as in the web.config. The control looks ok at run time but when viewed in the Visual Studio designer it cannot pick up the current theme.
0
8987
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8826
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9366
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9316
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8239
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4597
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2777
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.