Solve: Partial rendering updates the page but CSS styles are lost.
Nov 10, 2008

In IE,  if you have a style-sheet updated to certain component (server component) and if they are inside update panel when a ajax post back happens you might loose the style-sheet.

I faced this problem while working on a small user control which is like toolbar. I have created that with LinkButton controls and when i placed this user control inside update-panel after click on the link entire style sheet goes off from the link button.

This bug was reported way back in 2006 and it happens only in IE. It seems like MS is not interested to fix this but either in Atlas or in IE and has closed this issue by calling it an Behaviour By Design.

There is a way around to fix this issue. I have added following code in OnInit Event of my user control and i got styles retained on link button.

protected override void OnInit(EventArgs e)
ScriptManager sm = ScriptManager.GetCurrent(Page);
if (!sm.IsInAsyncPostBack)
string css = """;

Prakash Software Solutions PVT LTD. Offer wide range of services to their clients all over the globe. We successfully delivered projects i.e. software development, cloud computing solutions, SharePoint development solutions, mobile app development and Microsoft technology solution to our Sweden, Denmark, Netherlands, France, Norway, Germany, Spain, Italy, Switzerland, Belgium, Luxembourg, Ireland, United Kingdom, United States, Canada, Brazil, Peru, UAE, Dubai, Saudi Arabia, Kuwait, Qatar, Bahrain, Singapore, New Zealand and Australia Clients.

Leave a Reply

Your email address will not be published. Required fields are marked *


Related Posts

Setting up an Offshore Development Center: An advantage

Organizations big or small can now compete in the global market with the…

Aug 28, 2013

Covariance and Contra variance in .Net 4.0 Framework

Covariance and Contra variance in Delegates There has always been confusion for me…

Jul 8, 2010

Problem with AJAX popup extender and CollapsiblePanel in Opera

Opera randers HTML page bit differently then other browsers which will put your…

Nov 9, 2008

Copyright © Prakash Software Solutions Pvt. Ltd. All Rights Reserved.