.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

AJAX UpdatePanel Memory Leaks in IE.

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :ASP.Net

After researching why a page I have using an UpdatePanel to perform a refresh every 15 seconds was using up piles and piles of memory over time, I discovered that this is a "well-known" issue with the UpdatePanel not cleaning up properly in IE (some issue with reference counting in COM interop or some such).  UpdatePanel does not seem to have this issue in Firefox (haven't confirmed the issue in other browsers).

If this is a "well-known" issue, two questions:

Is there a "well-known" workaround to this?  I know that a full-page refresh will cause the memory to be cleaned up, but some pages may be up for a long time and I don't want to interrupt any user interaction with the page that may be going on.  I will if it is required, but it is a sloppy, sloppy UI kluge... you know, one of those "as a self-respecting coder I hang my head in shame at what I have wrought" kind of kluges.

Is there any effort being made to fix this?  I've looked about, however, most articles on this do not make mention of even MS acknowledging bug status for this while I've seen many telling me why this is an issue, and how it's a "design" thing.  I hear IE9 is supposed to take care of this... I guess what you'd call a non-issue, but it will only be available to

View Complete Post

More Related Resource Links

How to detect and avoid memory and resources leaks in .NET application

Despite what a lot of people believe, it's easy to introduce memory and resources leaks in .NET applications. The Garbage Collector, or GC for close friends, is not a magician who would completely relieve you from taking care of your memory and resources consumption.

I'll explain in this article why memory leaks exist in .NET and how to avoid them. Don't worry, I won't focus here on the inner workings of the garbage collector and other advanced characteristics of memory and resources management in .NET.

UpdatePanel is not a known element - message when upgrading to 1.0 ajax


It worked on one of my old pages.  I change the web.config, renamed all the <asp.

On some aspx page it doesn't recognize the updatepanel.  It only does on one page.  If I create a new aspx page with a different name - then it works.

Should I just create a new web project ajax - then copy all my code into there?  Or is there a way to get those old pages to recognize the new ajax controls?

Debug Leaky Apps: Identify And Prevent Memory Leaks In Managed Code


When is the .NET Garbage Collector unable to reclaim memory? The answer might surprise you. Stay tuned.

James Kovacs

MSDN Magazine January 2007

How do you insert a google map into an ajax updatepanel?


I have built a site that I am using google maps on.  The default page has a google map with info windows containing links and all works great... until a user clicks on the link in the info window.  Doing so takes them to a community page that I have built.  On this community page, I have an ajax update panel that has 2 panels nested inside of it with the visibility set for one to be on and the other off.  The default panel shows community photos, and the second panel I want to show the google map and common directions to the community.  In testing, my buttons to switch the visibility of the panels works great as it should without postback, but when I try to add the map to its panel, it does not show up.  I am new to ajax as well as google maps and I'm not sure why the same code would work fine on my default page but not the community page.  The only obvious thing I can assume is because the community page map is in an update panel.  

How do you insert a google map into and ajax updatepanel and have it work correctly?  Many thanks in advance. 

memory leaks

Hi, I am trying to detect memory leaks...memory(RAM) keep goes up this is the code I am using, where dbManager is the DLL that holds all of the DAL Code (LINQ TO SQL) foreach (string lnk in splited_links) { unique_key = Helpers.FilterBadWords(lnk, new string[] { "http://www.", "-lcs.html" }); article = dbManager.GetArticleByUniqueKey(unique_key); if (article == null) { Match matchLyrics2 = reLyricsPage.Match(lnk); if (matchLyrics2.Success) { //do something } } } //IN THE DLL FILE public Tbh_Articles GetArticleByUniqueKey(string uniqueKey) { using (KaruselaDataContext ctx = new KaruselaDataContext(connection)) { //KaruselaDataContext ctx = new KaruselaDataContext(connecti

Ajax Nobot, updatePanel on firefox


Hi guys,

I encounter a very strange problem and hope someone could help me. I have a content page in which a nobot control is used to prevent any robot guessing. There is an updatepanel used to hold all the input fields, enter button and the nobot control. Whenever I finished filling out the form and pressed enter button, an invalidbadresponse will come out. This problem doesn't appear on IE, Chrome but on Firefox. I used firebug to trace the problem and then i found that 2 posts were submited. 1 is aborted and 1 is successfully sent. The most wired thing is, when i fired the webpage on debugger mode from visual web developer (http://localhost:<port> ), firefox can validate it without a problem. Once I copied the page to my website ( http://www.mySite.net/ ), such invalidbadresponse comes out. Then, I tried to remove the updatePanel and now only 1 post is sent and no more invalidbadresponse is shown. Therefore, I guess the problem is between the mechanism of nobot and updatepanel. Could anyone know what happens behind and what I could do to solve this problem ?

My challenge is from the internet:

    Protected Sub CustomChallengeResponse(ByVal sender As Object, ByVal e As AjaxControlToolkit.NoBotEventArgs)

refresh listbox on updatepanel ajax control tool kit


Hi all, 

i have a dropdownlist and a listbox inside an update panel. I populate the listbox with a selected value of the dropdownlist and works ok. The problem is when delete an item from the listbox because does not the refresh of the listview and still to watch me the deleted item. 

how can i do the refresh?

pd: i am using framework 2.0

thx in advance!

Javascript allert inside AJAX UpdatePanel not working


I am having problems with alert box not popup when I'm using AJAX UpdatePanel. The following is what I have and it's not working.

1    ClientScriptManager csm = Page.ClientScript;
3    if(!csm.IsStartupScriptRegistered(this.GetType(), "winPop"))
4    {
5    	csm.RegisterStartupScript(this.GetType(), "winPop", "alert('Update is successful');", true);
6    }

I have to stress that the reason why it does not work is because I'm using AJAX UpdatePanel. If I turned off the AJAX UpdatePanel then it works perfectly. So does anyone have solution to go around this AJAX UpdatePanel issue?

WPF Memory leaks in a Huge Images list


I create a simple WPF application to display images in a child window from a folder.

this folder contains a huge number of images

After closing the child window that contains a virtualization tile panel and a data virtualization collection taken from this article the memory will not return as it was before opening the window.

I followed some steps mentioned in this article. but i still see some memory leaks! so could you please help me to find it.

- All of resources are frozen like this:


<Window ...



Efficient use of Ajax Updatepanel



I have one query, as i have read somewhere that just using updatepanel on your page and placing some controls inside that doesnt help you to improve performance of your web application, since in this case although its a partial postback it goes through all the page events and generate same amount of data in request and response as of created in normal postbacks.

Efficient use of Updatepanel is to call webmethod through javascript for associated actvities.

Can anyone explain me this bit more, if it realy helpfull then how to use it in application..?

Any kind of help will be appreciated








AJAX UpdatePanel and frames



I am new AJAX. In my webpage I have two frames on on the top for the menu and so on, and one on the button which have the content.

I have a buttom on the upper frame. which I included in the AJAX UpdatePanel trigger. The problem now is that the result page displays on the same frame (the upper). I have target frame set to ContentFrame, so it worked fine before using the update Panel. Now the question: Is there any solution so I can force the target to be another frame than the one which has the UpdatePanel.

Thanks for help. 

ajax - Nested Datalist in Updatepanel



I need to input nested data (data entry) and i am using datalists for the same. The details include many details and I am managing the same using controls for each in information.

The parent datalist can have max 20 rows with 7 rows in each child datalist. I tried to bind the datalists with max rows, due to which the rendered page size was almost 12MB and it took more than 2 mins to load.

Alternative to this, I put the parent datalist in updatepanel and bound it to one row initially.  Onclick of add button, i implemented an asynchronous postback to add new row to the parent datalist datasource and update the updatepanel to display the datalist.  The new row is displayed properly in datalist, however it gets reset to original datalist after some seconds.

I have no clue about the reason for it. Please help me to resolve the above issue.


Ajax Controls - ComboBox inside updatepanel




I have a web part which has an updatepanel with variuos panels.

When i add a combobox to a panel which is not shown to begin with but then is set to visible = true, the combobox erros and is not displayed correctly.


If i have one combobox already visible and working fine, then the others are OK - but thats not a solution.


How do i have a combobox inspde a hidden panel and then show it without having to rebind the whole page.




copy value from one textbox to another inside UpdatePanel with AJAX CalendarExtender


I have a calendar extender tied to a textbox.  When I select a date from the calendar, it displays the selected date in the textbox.  When I click a submit button, it passes no value.  Any ideas on why the textbox doesn't store the value from the calendar?

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then

            If txtPickUp.Text = "" Then
                txtPickUp.Text = Date.Today
            End If
            If txtDropOff.Text = "" Then
                txtDropOff.Text = Date.Today
            End If

            btnSearch.Attributes.Add("onclick", "return ConfirmL();")
        End If
    End Sub


          <asp:TextBox ID="txtPickUp" runat="server" ReadOnly="true" Width="75px" />
         <asp:CalendarExtender ID="CalS" runat="server" TargetControlID="txtPickUp" PopupButtonID="txtPickUp" />


C# Ajax Updatepanel AsyncPostBackErrorMessage



I currently have a method in a base page that takes care of any errors that are thrown - it gets the error message, and the page it came from, writes it to the DB, and redirects to a custom Error page


void Page_Error(object sender, EventArgs e)
        /// <summary>
        /// Get Error & Page Name - Write to DB
        /// </summary>
        Exception ERROR = Server.GetLastError();
        string PAGE_NAME = base.Request.ServerVariables["SCRIPT_NAME"].ToString();
        Utility.ErrorLog(PAGE_NAME,Convert.ToString(ERROR), "", "", "", "");



Microsoft AJAX CDN

Content delivery networks (CDNs) are composed of "edge cache" servers that are strategically placed around the world at key Internet network points. These "edge cache" servers can be used to cache and deliver all types of content - including images, videos, CSS and JavaScript files.

Using a CDN can significantly improve a website's end-user performance, since it enables browsers to more quickly retrieve and download content. For example, instead of having a browser request for an image traverse all the way across the Internet to your web server to download, a CDN can instead serve the request directly from a nearby "edge cache" server that might only be a single network hop away from your customer (making it return much faster - which makes your pages load quicker).

AJAX GridView Checkbox Select All in ASP.Net

In the previous article GridView Select Multiple Rows you learnt the multiple row selection in GridView control. Here you will get the C# code sample to select all the gridview rows using single checkbox server control. You can highlight the selected rows with different color and Font state Bold. If you want to use the selection values on different ASP.Net
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend