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 8559957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:10:15+00:00 2026-06-11T16:10:15+00:00

I have an update panel with a timer control set up to automatically check

  • 0

I have an update panel with a timer control set up to automatically check for some data updates every minute or so.

If it sees that the data updates, it is set to call a local script with the serialized JSON data.

ScriptManager.RegisterStartupScript(UpdateField, GetType(HiddenField), ACTION_CheckHistoryVersion, "updateData(" & data & ");", True)

where “data” might look something like

{
   "someProperty":"foo",
   "someOtherProperty":"bar",
   "someList":[
     {"prop1":"value"},
     {"prop2":"value"}, ...
   ],
   "someOtherList":[{},...,{}]
}

“data” can get quite large, and sometimes only a few items change.

The problem I am having is this. Every time I send this back to the client, it gets added as a brand new script block and the existing blocks do not get removed or replaced.

output looks something like this:

<script type="text/javascript">
  updateData({
       "someProperty":"foo",
       "someOtherProperty":"bar",
       "someList":[
         {"prop1":"value"},
         {"prop2":"value"}, ...
       ],
       "someOtherList":[{},...,{}]
    });
</script>
<script type="text/javascript">
  updateData({
       "someProperty":"foo",
       "someOtherProperty":"bar",
       "someList":[
         {"prop1":"changed"},
         {"prop2":"val"}, ...
       ],
       "someOtherList":[{},...,{}]
    });
</script>
<script type="text/javascript">
  updateData({
       "someProperty":"foos",
       "someOtherProperty":"ball",
       "someList":[
         {"prop1":"changed"},
         {"prop2":"val"}, ...
       ]
    });
</script>

with a new script block being created every time there is a change in the data.

Over time the amount of data accumulating on the browser could get potentially huge if we just keep adding this and I can’t imagine how most people’s browser would take it, but I don’t think it could be good.

Does anyone know if there is a way to just replace the code that has been sent back to the browser rather than continuously adding it like this?

  • 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-06-11T16:10:16+00:00Added an answer on June 11, 2026 at 4:10 pm

    I would recommend to use web service with some webmethod which you will call inside window.setInterval. In success handler of your webmethod (on client side) you can just take response and do whatever you want with it. And it will not be saved in your page (well, if you will do everything wrong). Benefit is that you will minimize request size(updatepanel will pass all your viewstate data, which could be large enough) and will limit server resources usage (update panel is causing full page live cycle, suppose slightly modified, but anyway – all those page_load, page_init, etc…) and with web service you will only what you need.

    Here is an article where you can see how it could be created and used on client side. Looks like good enough.

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

Sidebar

Related Questions

I have update panel that content check box, textbox, 3 DropDownList with CascadingDropDown extender.
I have an update panel on my page with some links that have onClick
I have and Update Panel with a Grid inside of it. The grid's data
I have a gridview inside an update panel, that is doing inline editing. When
We currently have a WebForms control with an update panel. The code-behind contains logic
I have two radio buttons both set as async triggers for an update panel
I have a modal popup extender tied to a asp:panel control that I want
I going through some code that I inherited. The page has an update panel
I have a dynamically created button that is being added to an update panel
I have an ASP.Net Update Panel which contains controls that I am trying to

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.