Solved

Setting stylesheet in code behind file to alleviate style "flicker"

Posted on 2006-06-12
1
256 Views
Last Modified: 2012-08-14
Hi all,
I ve got a VS2005 web application which is using a single style sheet.
Originally I set the style sheet in the HTML itself using <link href="">. The style sheet has some basic settings for body font and table colors etc.
However when I load the page it is doing a weird flicker thing. It shows the page without formatting for a split second then it applies the style sheet and everything looks good.

I was wondering whether I could set the css in the page load event so that it occured before controls were loaded?
How do you set the pages style in code?
I tried         this.Page.StyleSheetTheme = "~/myStyle.css";  but it didnt apply any style.

Any ideas?
Thanks
D
0
Comment
Question by:CoreSupport
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
here4u247 earned 125 total points
ID: 16884680
i'm not quite sure, but on header html block if the you add new tag with run-at=server, you should be able to modify that tag, i think!? also to change the CSS before the controls loads, then you need to change the CSS within OnInit() method

cheers

AM
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question