Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

670 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