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.

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=103134

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)
{
base.OnInit(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

Sorting a Collection of Customized Objects

When using our own Object model in our projects, we have our own…

Sep 10, 2009

Entity Framework 7 Beta Version 8 Launched

What is Entity Framework? Entity framework is an ORM that generates business objects…

Jun 2, 2016

How to get status message from Telerik MVC Upload Control

Download Telerik library from http://www.telerik.com/products/aspnet-mvc.aspx To see demo of uplod control, visit http://demos.telerik.com/aspnet-mvc/upload…

Jun 21, 2011
Top

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