Saturday, March 31, 2012
Themes not working sometimes.
fraContent.Attributes.Item("src") = "Splash.aspx"
and sometimes the themes do not work. The page displays in the browser but
the themes are not applied. The <link ... is on the page when I look at the
soruce.
Any Ideas.
Thank you,
--
JerryHello Jerry,
I do not have your source code to test on directly. But here are some
suggestions that, I think, deserve your trial.
1. Does the "<link _" links to the correct theme page when the themes are
not applied? Please pay attention to the relative path. In my best guess,
the theme page cannot be loaded because the relative path to the page is
not correct.
2. Is the line fraContent.Attributes.Item("src") = "Splash.aspx" inside the
if statement: if (!Page.IsPostBack) { _ }?
If that, when the page post-back occurs, the line
fraContent.Attributes.Item("src") = "Splash.aspx" will not be executed in
the Page_Load event handler.
We can debug the site in Visual Studio, set a breakpoint on
fraContent.Attributes.Item("src") = "Splash.aspx" and see if it is executed
every time when we need to load the theme page.
3. When the theme page cannot be loaded, what is the browser? As far as I
know, some browsers do not support html tags very well.
By the way, since ASP.NET 2.0, a new feature "Theme & Skin" has been
supported by ASP.NET. If your theme pages only contain style information,
I'd suggest using ASP.NET Theme, which is much easier to accomplish the
task. For more information about "Theme and Skin" in ASP.NET, please refer
to:
ASP.NET Themes and Skins Overview
http://msdn2.microsoft.com/en-us/library/ykzx33wh.aspx
How to: Apply ASP.NET Themes Programmatically
http://www.15seconds.com/issue/040105.htm
Code in Style with ASP.NET Themes.
http://www.15seconds.com/issue/040105.htm
Hope it helps.
Regards,
Jialiang Ge (jialge@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support
========================================
==========
For MSDN subscribers whose posts are left unanswered, please check this
document: http://blogs.msdn.com/msdnts/pages/postingAlias.aspx
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...t/default.aspx.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.
Hello Jerry,
Sorry for the incorrect link to the article "How to: Apply ASP.NET Themes
Programmatically".
The link should be:
http://msdn2.microsoft.com/en-us/library/tx35bd89.aspx
If you have any other concerns or need anything else, please feel free to
let me know.
Regards,
Jialiang Ge (jialge@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support
========================================
=========
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
========================================
=========
This posting is provided "AS IS" with no warranties, and confers no rights.
Jialiang,
Thank you for your reply. The problem only occurs SOME of the time so all
the links are about appying the themes and if the code was not correct the
themes would not be there ALL of the time not just SOME of the times.
Anyway.
I have fixed the problem. This does not explain why the problem occured in
the first place. I placed a system.threading.thread.sleep line in the
LoadComplete event of the page. this seemed like the same problem solved by
the waitForEvents in window forms.
Have you seen any of this kind of problem.
Thank you
--
Jerry
"Jialiang Ge [MSFT]" wrote:
> Hello Jerry,
> Sorry for the incorrect link to the article "How to: Apply ASP.NET Themes
> Programmatically".
> The link should be:
> http://msdn2.microsoft.com/en-us/library/tx35bd89.aspx
> If you have any other concerns or need anything else, please feel free to
> let me know.
> Regards,
> Jialiang Ge (jialge@.online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
> ========================================
=========
> When responding to posts, please "Reply to Group" via your newsreader
> so that others may learn and benefit from your issue.
> ========================================
=========
> This posting is provided "AS IS" with no warranties, and confers no rights
.
>
Themes vs css?
I see the additional functionality that themes add. But it also seems to me
that if we use css instead of themes, then it's a lot easier for people to
change the look of our site as css is very well understood.
Any comments on how useful in practice the extra features of themes have been?
--
thanks - daveCSS files are usually part of a theme.
Rely on them as much as you wish.
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"David Thielen" <thielen@.nospam.nospam> wrote in message
news:CCBFC3CA-87C4-4C69-A847-208227AF90FE@.microsoft.com...
> Hi;
> I see the additional functionality that themes add. But it also seems to
> me
> that if we use css instead of themes, then it's a lot easier for people to
> change the look of our site as css is very well understood.
> Any comments on how useful in practice the extra features of themes have
> been?
> --
> thanks - dave
Hi,
How is this case going? Please feel free to let me know if you have any
concern or questions.
Thanks & Regards,
Neil Ni
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
Business-Critical Phone Support (BCPS) provides you with technical phone
support at no charge during critical LAN outages or "business down"
situations. This benefit is available 24 hours a day, 7 days a week to all
Microsoft technology partners in the United States and Canada.
This and other support options are available here:
BCPS:
https://partner.microsoft.com/US/te...erview/40010469
Others: https://partner.microsoft.com/US/te...upportoverview/
If you are outside the United States, please visit our International
Support page:
http://support.microsoft.com/defaul...ernational.aspx.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.
Themes, Pages, and Master Pages
Why cannot I attach a theme to a master page?
When I define a CSS within a theme and then attach the theme to a page it
seems that I cannot use the CSS definitions directly on that page. Is this
correct? If so, why?
Thanks
Jayin the web.config in the <pages> tag add a styleSheetTheme attribute with th
e
name of your theme. If that isn't what you want to do, you can always
temporarily drop the CSS link directly into the master page for editing and
then remove it when done (unless of course you want it directly on that page
).
"MS News" wrote:
> I am trying to understand some basic things about themes.
> Why cannot I attach a theme to a master page?
> When I define a CSS within a theme and then attach the theme to a page it
> seems that I cannot use the CSS definitions directly on that page. Is thi
s
> correct? If so, why?
> Thanks
> Jay
>
>
I messed up and see my mistake. Everything works as expected and very
nicely.
Jay
"MS News" <someone@.nowhere.com> wrote in message
news:eJWVBajMGHA.740@.TK2MSFTNGP12.phx.gbl...
>I am trying to understand some basic things about themes.
> Why cannot I attach a theme to a master page?
> When I define a CSS within a theme and then attach the theme to a page it
> seems that I cannot use the CSS definitions directly on that page. Is
> this correct? If so, why?
> Thanks
> Jay
>
>
Themes, Pages, and Master Pages
Why cannot I attach a theme to a master page?
When I define a CSS within a theme and then attach the theme to a page it
seems that I cannot use the CSS definitions directly on that page. Is this
correct? If so, why?
Thanks
Jayin the web.config in the <pages> tag add a styleSheetTheme attribute with the
name of your theme. If that isn't what you want to do, you can always
temporarily drop the CSS link directly into the master page for editing and
then remove it when done (unless of course you want it directly on that page).
"MS News" wrote:
> I am trying to understand some basic things about themes.
> Why cannot I attach a theme to a master page?
> When I define a CSS within a theme and then attach the theme to a page it
> seems that I cannot use the CSS definitions directly on that page. Is this
> correct? If so, why?
> Thanks
> Jay
>
>
I messed up and see my mistake. Everything works as expected and very
nicely.
Jay
"MS News" <someone@.nowhere.com> wrote in message
news:eJWVBajMGHA.740@.TK2MSFTNGP12.phx.gbl...
>I am trying to understand some basic things about themes.
> Why cannot I attach a theme to a master page?
> When I define a CSS within a theme and then attach the theme to a page it
> seems that I cannot use the CSS definitions directly on that page. Is
> this correct? If so, why?
> Thanks
> Jay
Themes vs css?
I see the additional functionality that themes add. But it also seems to me
that if we use css instead of themes, then it's a lot easier for people to
change the look of our site as css is very well understood.
Any comments on how useful in practice the extra features of themes have bee
n?
thanks - daveCSS files are usually part of a theme.
Rely on them as much as you wish.
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"David Thielen" <thielen@.nospam.nospam> wrote in message
news:CCBFC3CA-87C4-4C69-A847-208227AF90FE@.microsoft.com...
> Hi;
> I see the additional functionality that themes add. But it also seems to
> me
> that if we use css instead of themes, then it's a lot easier for people to
> change the look of our site as css is very well understood.
> Any comments on how useful in practice the extra features of themes have
> been?
> --
> thanks - dave
Hi,
How is this case going? Please feel free to let me know if you have any
concern or questions.
Thanks & Regards,
Neil Ni
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
Business-Critical Phone Support (BCPS) provides you with technical phone
support at no charge during critical LAN outages or "business down"
situations. This benefit is available 24 hours a day, 7 days a w
Microsoft technology partners in the United States and Canada.
This and other support options are available here:
BCPS:
https://partner.microsoft.com/US/te...erview/40010469
Others: https://partner.microsoft.com/US/te...upportoverview/
If you are outside the United States, please visit our International
Support page:
http://support.microsoft.com/defaul...rnational.aspx.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
Themes/Skins
Control in .skin file?
I've been searching for it whole afternoon without any luck.
Thanks,
Tomica GrilWe've got to drag each control into the IDE and use the properties window
and then go back and forth and back and forth. Nice huh?
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=...38&z=17&l=0&m=h
"Qweertz" <qweertz@.net.hr> wrote in message
news:enu1q9$6g4$1@.news1.carnet.hr...
> Does anybody know where to find list of all attributes I can set for each
> Control in .skin file?
> I've been searching for it whole afternoon without any luck.
> Thanks,
> Tomica Gril
>
This isn't exactly what you asked for, but you can enable Intellisense for
the skin files.
http://www.ckcmoss.com/archives/18-...0.htm
l
I had to close and re-open the project - in addition to the original
instructions - to get it to stick, but there it is.
"You actually can add intellisense to any file in Visual Studio 2005
providing you have a schema. Just drop it in the ~\Xml\Schemas folder."
Good info from a comment on the same page, in case you miss it.
Oh yea -- that's the kind of wrong I like to be. Thanks for bringing this to
our attention.
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=...38&z=17&l=0&m=h
"mank1327" <mcwadsworth@.hotmail.com> wrote in message
news:04806EE5-3E62-472D-B2D7-91ED80D3980A@.microsoft.com...
> This isn't exactly what you asked for, but you can enable Intellisense for
> the skin files.
> http://www.ckcmoss.com/archives/18-...0.h
tml
> I had to close and re-open the project - in addition to the original
> instructions - to get it to stick, but there it is.
> "You actually can add intellisense to any file in Visual Studio 2005
> providing you have a schema. Just drop it in the ~\Xml\Schemas folder."
> Good info from a comment on the same page, in case you miss it.
>
>
> We've got to drag each control into the IDE and use the properties window
> and then go back and forth and back and forth. Nice huh?
>
Yeah, I know that.
Intellisense is all I needed, but I didn't know that I can user it in skins
as well.
Thanks to both.
Themes/Skins
Control in .skin file?
I've been searching for it whole afternoon without any luck.
Thanks,
Tomica GrilWe've got to drag each control into the IDE and use the properties window
and then go back and forth and back and forth. Nice huh?
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=...38&z=17&l=0&m=h
"Qweertz" <qweertz@.net.hrwrote in message
news:enu1q9$6g4$1@.news1.carnet.hr...
Quote:
Originally Posted by
Does anybody know where to find list of all attributes I can set for each
Control in .skin file?
I've been searching for it whole afternoon without any luck.
>
Thanks,
Tomica Gril
>
This isn't exactly what you asked for, but you can enable Intellisense for
the skin files.
http://www.ckcmoss.com/archives/18-...ins-in-2.0.html
I had to close and re-open the project - in addition to the original
instructions - to get it to stick, but there it is.
"You actually can add intellisense to any file in Visual Studio 2005
providing you have a schema. Just drop it in the ~\Xml\Schemas folder."
Good info from a comment on the same page, in case you miss it.
Oh yea -- that's the kind of wrong I like to be. Thanks for bringing this to
our attention.
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=...38&z=17&l=0&m=h
"mank1327" <mcwadsworth@.hotmail.comwrote in message
news:04806EE5-3E62-472D-B2D7-91ED80D3980A@.microsoft.com...
Quote:
Originally Posted by
This isn't exactly what you asked for, but you can enable Intellisense for
the skin files.
>
http://www.ckcmoss.com/archives/18-...ins-in-2.0.html
>
I had to close and re-open the project - in addition to the original
instructions - to get it to stick, but there it is.
>
"You actually can add intellisense to any file in Visual Studio 2005
providing you have a schema. Just drop it in the ~\Xml\Schemas folder."
>
Good info from a comment on the same page, in case you miss it.
>
>
>
We've got to drag each control into the IDE and use the properties window
Quote:
Originally Posted by
and then go back and forth and back and forth. Nice huh?
>
Yeah, I know that.
Intellisense is all I needed, but I didn't know that I can user it in skins
as well.
Thanks to both.
Themes, Skins, and Masters
theme to an ASP.net website. I didn't used to like ASP because it was
too hard to apply a theme from a common theme folder like I could do
easily in PHP, but now I see that it has some nicer theming features
and master files.
So I want to use web.config to switch which theme I'm using, and I
want to be able to have several themes. My understanding of themes is
that I can only define styling in them as I could with CSS, but I
can't define code for the header, footer, etc with them. And that's
where master files come in, right? I'd like to switch which set of
master files is in use as the theme changes. IE, I'd like to put
several master pages that match in looks but have different functions
in each theme's folder along with the skins. But I don't think that it
will automatically switch to those masters when the theme is switched
in web.config. Can I use a variable in the <%@dotnet.itags.org. Page
MasterPageFile="... part? Specifically, can I include Page.Theme into
the middle of a path, like:
<%@dotnet.itags.org. Page MasterPageFile="App_Themes/{Page.Theme}/m1.master" %>
I can't make the themes very varied if all I can edit is the skins and
they all have the same xHTML code.
Also, what is the difference between global themes in the /Themes/
directory and page themes in the /App_Themes/ directory?
So is this possible? Or am I thinking along the wrong lines to do such
a thing?
-Mike PIIBriefly, we use the Page_PreInit event handler to change Themes and
MasterPages noting K. Scott Allen has documented the most helpful
information regarding this topic at http://odetocode.com/ but if you want to
master ASP.NET you need to delve into the page life cycle and learn it well
as it is fundamental to this and related tasks.
When using MasterPages you will also need to learn how to reference controls
which can be and is somewhat convoluted when using the FindControl method.
Try to get the hang of writing public properties to avoid using FindControl
when possible.
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
<mike@.learntoprogram.info> wrote in message
news:1178930483.643472.134670@.h2g2000hsg.googlegroups.com...
> Hi. I am having trouble grasping the concept of applying a consistent
> theme to an ASP.net website. I didn't used to like ASP because it was
> too hard to apply a theme from a common theme folder like I could do
> easily in PHP, but now I see that it has some nicer theming features
> and master files.
> So I want to use web.config to switch which theme I'm using, and I
> want to be able to have several themes. My understanding of themes is
> that I can only define styling in them as I could with CSS, but I
> can't define code for the header, footer, etc with them. And that's
> where master files come in, right? I'd like to switch which set of
> master files is in use as the theme changes. IE, I'd like to put
> several master pages that match in looks but have different functions
> in each theme's folder along with the skins. But I don't think that it
> will automatically switch to those masters when the theme is switched
> in web.config. Can I use a variable in the <%@. Page
> MasterPageFile="... part? Specifically, can I include Page.Theme into
> the middle of a path, like:
> <%@. Page MasterPageFile="App_Themes/{Page.Theme}/m1.master" %>
> I can't make the themes very varied if all I can edit is the skins and
> they all have the same xHTML code.
> Also, what is the difference between global themes in the /Themes/
> directory and page themes in the /App_Themes/ directory?
> So is this possible? Or am I thinking along the wrong lines to do such
> a thing?
> -Mike PII
>
On May 12, 5:00 pm, "clintonG" <nob...@.nowhere.com> wrote:
> Briefly, we use the Page_PreInit event handler to change Themes and
> MasterPages noting K. Scott Allen has documented the most helpful
> information regarding this topic athttp://odetocode.com/but if you want to
> master ASP.NET you need to delve into the page life cycle and learn it wel
l
> as it is fundamental to this and related tasks.
> When using MasterPages you will also need to learn how to reference contro
ls
> which can be and is somewhat convoluted when using the FindControl method.
> Try to get the hang of writing public properties to avoid using FindContro
l
> when possible.
> <%= Clinton Gallagher
> NET csgallagher AT metromilwaukee.com
> URLhttp://clintongallagher.metromilwaukee.com/
Thanks for your help. I finally got it down.
ASP.net is
-Mike PII
Themes/skins with multiple browsers
We're developing an application that should render well on both IE and
Firefox and should be based on Themes. Does anyone have any good tips on how
to maintain different CSS-files for different browsers and still use themes?
How/where do you select the CSS to use as this is autogenerated?
Thanks,
MansoOn Wed, 29 Mar 2006 08:45:02 -0800, Manso wrote:
> Does anyone have any good tips on how to maintain different CSS-files
> for different browsers and still use themes?
Yes, don't do it. There is (almost) no reason to maintain different CSS
files for different browsers. The one real exception here is NN4, but
using the @.import hack is common practice.
Unless you have a very complex design, you can design a site with only
minimal hacks to work on multiple browsers. You should just stay away from
features that are problematic.
It's very difficult to accurately sniff which browser is which, and serve
the correct CSS. You can't rely on browser agent strings, because many
people have their non-IE browsers configured to report that they are IE.
Themes/skins with multiple browsers
We're developing an application that should render well on both IE and
Firefox and should be based on Themes. Does anyone have any good tips on how
to maintain different CSS-files for different browsers and still use themes?
How/where do you select the CSS to use as this is autogenerated?
Thanks,
MansoOn Wed, 29 Mar 2006 08:45:02 -0800, Manso wrote:
> Does anyone have any good tips on how to maintain different CSS-files
> for different browsers and still use themes?
Yes, don't do it. There is (almost) no reason to maintain different CSS
files for different browsers. The one real exception here is NN4, but
using the @.import hack is common practice.
Unless you have a very complex design, you can design a site with only
minimal hacks to work on multiple browsers. You should just stay away from
features that are problematic.
It's very difficult to accurately sniff which browser is which, and serve
the correct CSS. You can't rely on browser agent strings, because many
people have their non-IE browsers configured to report that they are IE.
Thems and Templets.
Hello to all,
I am learning to apply themes and css to web application.
I want to know are there any themes and temeplets awailable for download?
If you download the starter kits, or tutorial code, some of them employ themes and templates, you could use them as examples.
The link is here:
http://www.asp.net/default.aspx?tabindex=5&tabid=41