I have an user control inside an UpdatePanel. Once an event is triggered and updates the user control - it seems to lose its css styles. This happened to me in IE8 only, whi
This issue is mentioned here.
I tried the suggestion - registering the css link in the OnInit - and it seems to work.
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
ScriptManager sm = ScriptManager.GetCurrent(Page);
if (!sm.IsInAsyncPostBack)
{
string css = string.Format("", ResolveUrl(CssClassFile));
ScriptManager.RegisterClientScriptBlock(this, typeof(MyBlahControl), "MyBlahId", css, false);
}
}