Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7008413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:43:54+00:00 2026-05-27T21:43:54+00:00

I am working on asp.net, C# web application. Working on my main page in

  • 0

I am working on asp.net, C# web application.
Working on my main page in application, where all the codes are synchronize and works well.

Now, I need to change some of the functionality using ajax JQuery Asyn. calls. In my case it works for me. everything is fine.

Now my page is having asp.net AjaX Timer Control which gets fire at every one minute. This is one of the functionality which is need to be there and not able to change using jQuery.

Now, when my timer event (Tick) fires at every one minute, my dynamically filled div ( html() of ajax jquery) gets blank when page gets postback.

i.e. consider my page having div with id = div1, and this gets filled with ajax jQuery call which returns me html of remote page, so the content of that is totally dynamic.
When page gets fired, that div is blank..

How can I keep my div’s to be as it is when my page gets post back?

(think this is possible as Gmail works on the same thing, how they mantain?)

Please let me know if require more details if not clear.

Below is the image with ajax call.

enter image description here

now, when pages gets postback, it is something like below….

enter image description here

it is not possible for me to give complex code here, how ever i give a sample code here by.

<asp:ScriptManager ID="Scriptmanager1" runat="server">
</asp:ScriptManager>
<asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="Timer1_Tick" Enabled="true">
</asp:Timer>
<div>
    <asp:Button Text="text" runat="server" OnClientClick="callfun();return false;" />
</div>
<asp:Button Text="text" runat="server" ID="btn" OnClick="btn_Click" />
<div id="div1">
</div>
<script>

    });
    function callfun() {
        $("#div1").html("test me, test me");
    }
</script>

code behind…..

  protected void Page_Load(object sender, EventArgs e)
{

}
protected void btn_Click(object sender, EventArgs e)
{
    Response.Write("postback");
}
protected void Timer1_Tick(object sender, EventArgs e)
{
    System.Threading.Thread.Sleep(2000);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:43:55+00:00Added an answer on May 27, 2026 at 9:43 pm

    Please use pageLoad(). It gets fired after each update panel refresh.

    var cached_html;
    $(document).ready(function() {
        cached_html = "html returned from an ajax call"
        $("#div1").html(cached_html);
    });
    
    function pageLoad() {
        $("#div1").html(cached_html);
        //if this doesn't work, you need to make ajax call each time the refresh happens
    }
    

    And forget gmail for now. They do not have a Sys is undefined 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on an asp.net/C# web application, In the main page: I have
Well, simple question. I'm working with VS2008 on an ASP.NET web application which has
I'm working on an ASP.NET web application. There's a bill page which has two
I am working on asp.net web application in which i need to show the
I have working in asp.net web application. Here I need to run JavaScript before
I'm working on asp.net web application where I need to use CAPTCHA to test
I have a working ASP.NET MVC web application to manage projects and customers. Now
I'm working on Asp.net MVC3 web application. I'm having one page on which appx.
I am working on an ASP.Net web application that must print dynamically created labels
I am working on an ASP.NET web application that is required to bring up

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.