Click here to Skip to main content
15,868,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm a begginner in ASP.NET :-O ,

I'm writing a website in VS2010 based on asp.net webForm, and bump into the problem below :doh: :
In my website, I need to refresh data to realize realtime monitoring. So I used asp.net ajax extension server controls Timer and UpdatePanel to perform partial page refreshment.
The website works well except it causes the client browser(IE,Safari,Chrome, except Firefox) having memory leak problem!
After the website page run several hours, the client browers can take up huge memories. I searched on Internet but haven't figured out any solutions.
Can anyone help?:confused:
Thanks with all my heart~:rose:

My simplified codes are like this:
XML
Default.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title></title>
</head>
<body>
  <form id="form1" runat="server">
  <asp:ScriptManager ID="ScriptManager1" runat="server" />
  <asp:UpdatePanel ID="UpdatePanel1" runat="server" >
  <ContentTemplate>
  <asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="Timer1_Tick" />
  <div>
  <asp:Label ID="Label1" runat="server" Text="你好,Hello" />
  </div>
  </ContentTemplate>
  </asp:UpdatePanel>
  </form>
</body>
</html>

Default.aspx.cs:
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
  protected void Page_Load(object sender, EventArgs e)
  { }

  protected void Timer1_Tick(object sender, EventArgs e)
  {
  Label1.Text = "Refreshed value:" + DateTime.Now.ToString();
  }
}
Posted
Updated 25-Jan-11 0:05am
v2

1 solution

Well, it looks like you need to inform users to use Firefox! :)

It looks like this isn't something that you can fix because the problem is with the browser. So you should take it up with the team that programmed the browser and let them know there is a problem.

http://connect.microsoft.com/ie[^]

http://dev.chromium.org/for-testers/bug-reporting-guidelines[^]

http://browsers.about.com/od/safar1/ss/safaribugreport_2.htm[^]

Good luck!
 
Share this answer
 
Comments
Chunmei Hu 25-Jan-11 21:30pm    
E.F. Nijboer, Thank you for your answer and suggestion, maybe that's exactly what I should do! ;P
And I also very much welcome other solutions from developer friends who had acrossed the similer problem! :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900