Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear all,


I am working in a application where database contains 20,000,00 records in heavily used tables and user dashboard is designed to show various information from database using these tables.
For this purpose I used asp.net timer control with ajax update panel and AsyncPostBackTrigger to load page in 2 parts, but my problem is that it works only when debug="true" in web.config. Since debug="true" slows application performance down then it can't be set as true.
Can anybody help me to solve this issue in my application.


Thanks a lot.

What I have tried:

Design:

HTML
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <contenttemplate>
        </contenttemplate>
        <triggers>
            <asp:AsyncPostBackTrigger ControlID="ddl_District" EventName="SelectedIndexChanged" />
            <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
            <asp:AsyncPostBackTrigger ControlID="Timer2" EventName="Tick" />
        </triggers>
    
    <asp:Timer ID="Timer1" runat="server" OnTick="Timer1_Tick" Interval="500">
    
    <asp:Timer ID="Timer2" runat="server" OnTick="Timer2_Tick" Interval="1000" Enabled="false">


Code:

C#
protected void Timer1_Tick(object sender, EventArgs e)
{
    Fetch_Function();
    Timer1.Enabled = false;
    Timer2.Enabled = true;
}

protected void Timer2_Tick(object sender, EventArgs e)
{
    FillCount();
    Timer1.Enabled = false;
    Timer2.Enabled = false;
    //Timer3.Enabled = true;
}
Posted
Updated 7-Apr-16 23:37pm
v2
Comments
Sinisa Hajnal 8-Apr-16 7:00am    
Unless you have some timing problems in which you have to have slower application or you have defined #ifdef DEBUG somewhere, the application should work the same in debug and release mode. You have some other problem, probably with publishing the release version.

You should call timer.Stop and timer.Start instead of enabling/disabling.

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