Themes not working sometimes.

J

Jerry C

I am setting the src of a Iframe in the page load like this:
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,
 
J

Jialiang Ge [MSFT]

Hello 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 ([email protected], 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/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jialiang Ge [MSFT]

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 ([email protected], 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.
 
J

Jerry C

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
 

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,792
Messages
2,569,639
Members
45,348
Latest member
RoscoeNevi

Latest Threads

Top