Try following code:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
System.Timers.Timer aTimer = new System.Timers.Timer();
aTimer.Elapsed += new ElapsedEventHandler(TimerCharts_Tick);
aTimer.Interval = 10000;
aTimer.Enabled = true;
}
}
protected void TimerCharts_Tick(object sender, EventArgs e)
{
GetValidCharts();
}
Remove the control from aspx page :
<asp:Timer ID="TimerCharts" runat="server" Interval="300000" OnTick="TimerCharts_Tick" >
</asp:Timer>