Wednesday, September 24, 2008

GridView in UpdatePanel refreshes entire page

I've been seriously banging my head against the desk for a couple of hours now. I've got two pages, each loads a different user control. The user controls have a GridView housed inside an AJAX UpdatePanel. When you sort or change page numbers, the grid should update without refreshing the whole page.

One works, the other doesn't. The settings on the two sets of controls and pages are identical.

I finally traced this down. One page has in it's web.config xhtmlconformance mode="Legacy"and that was the downfall. The Legacy setting mucks with the HTML a bit and the update panel doesn't work. The default is "Transitional" so I set it to that.

All is well with the world...now where's the Excedrin?

3 comments:

Anonymous said...

Thank you so much, i couldn't figure out why my update panel wasn't working, now i know!

Perry said...

Can I ask, did you have EnablePartialRendering="true"

set on your ScriptManager tag?

Tom Puleo said...

I don't think so. I'll check when I'm back from vacation.