views:

54

answers:

1

I have a child page with an UpdatePanel on it that is connected to a timer that autorefreshes every 5 seconds. I've tried a few different PNG fixes, and they work until the UpdatePanel refreshes that section. Then, depending on the fix the PNGs either disappear or go back to nontransparent. Do I need to forcefully run the javascript when the UpdatePanel refreshes? How would I go about this?

Thanks!

+2  A: 

If your using a JavaScript trick to get around IE 6's lack of png transparency, you need to register your script with the ScriptManager to run when the UpdatePanel refreshes.

protected void Page_Load(object sender, EventArgs e)
{ 
    ScriptManager.RegisterStartupScript(this, typeof(Page),
         UniqueID, "doSomething()", true);
}

MSDN Reference

ICodeForCoffee
Seems to have worked perfectly! Thanks for your help, spent wayy too long on that :)