ASP.NET - AJAX postback/update causes page footer to be lost
Asked By Henry Taylor on 09-Oct-14 02:16 PM
I inherited a web site.
AJAX was not implemented correctly and didn't work at all.
On the master page I have a ContentPlaceholder inside a form tag.
In the ContantPlaceholder aspx file I register the AjaxControlToolkit.
In the ContantPlaceholder aspx file I have a Content tag pointing to the master page ContantPlaceholder then a ToolkitScriptManager.
Inside that I have an UpdatePanel then a ContentTemplate. All tags are closed properly at the end of the content page.
AJAX works fine EXCEPT on the master page there is code for a footer placed below the ContantPlaceholder.
When the AJAX postback occurs the footer is lost but if you look at the page source it is there - it just doesn't show. Perplexing.
F5 refresh restores the footer.
Any ideas why the footer doesn't show even though the source is there?
Thanks.
Henry Taylor replied to Robbe Morris on 09-Oct-14 04:58 PM
I have a gridview that contains several columns that contain numbers.
It shows the last 6 months of data (1 row for each month). The user can click a radio button to signal the grid to load all past data.
When the form opens by default it shows the last 6 months then below the grid is the footer. The footer shows the first time the page loads..
When the AJAX call gets the new grid data the footer disappears.
I have looked through this document and checked all the tags and they seem to be formed correctly. I would think that if they were not the footer would not show the first time the form loads.
To re-cap all the AJAX call does is re-load the gridview.
This page is constructed with <div> tags and css. I am thinking a combination of these two is the most likely culprit??