Monday, 18 January 2010

SIFR flash replacement with AJAX update panel

If you have an ajax update panel only partially updating your page you'll find that the standard SIFR implementation doesn't work on any items in the update panel. To overcome this, you need to wrap the whole contents of sifr-config.js in a function. I called it callSIFR.

Then you need to write the call to this function to the client at the PreRender event from your master page.
protected void Page_PreRender(object sender, EventArgs e)
    ScriptManager.RegisterStartupScript(this, typeof(Page), "SIFRcall", "callSIFR();", true);

1 comment:

  1. Brilliant stuff. Saved me a lot of time!


Comments are moderated, so you'll have to wait a little bit before they appear!