Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2006-06-12
1
Medium Priority
?
271 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
1 Comment
 
LVL 7

Accepted Solution

by:
here4u247 earned 250 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Loops Section Overview
Suggested Courses

886 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