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

  • Home
  • SEARCH
  • 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 7809421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:26:02+00:00 2026-06-02T03:26:02+00:00

I placed a label that named as LabelTotalNumber on Asp.net webform. I want update

  • 0

I placed a label that named as LabelTotalNumber on Asp.net webform. I want update a value every one minute by jQuery without refresh the form. How do I do it?

I can do this way in Page_Load event for one time.

var sqlResult = (From obj in db.RequestList
                 where obj.IsApproved == "Approved"
                 select obj).count();
LabelTotalNumber.text = sqlResult;
  • 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-02T03:26:06+00:00Added an answer on June 2, 2026 at 3:26 am

    Out-of-the-Microsoft-box you could use an UpdatePanel and a Timer.

    If you don’t like the contents of the Microsoft box and wanna use jQuery/javascript you could send AJAX requests at regular intervals (using the window.setInterval method) to an ASP.NET PageMethod (in which case basically you will have to give yourself a little pain to read jQuery’s documentation/tutorials and write a little code).

    So an ASP.NET PageMethod:

    [WebMethod]
    public static int Approved()
    {
        return (from obj in db.RequestList
                where obj.IsApproved == "Approved"
                select obj).Count();
    }
    

    and then hammer this PageMethod with an AJAX request every minute or so:

    window.setInterval(function() {
        $.ajax({
            url: '/foo.aspx/Approved',
            type: 'POST',
            contentType: 'application/json',
            data: '{ }',
            success: function(result) {
                var count = result.d;
                // TODO: do something with the count returned by the server
                // like assigning it to a label or something:
                $('#someLabelId').html(count);
            }
        });
    }, 60 * 1000);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to modify the text of a Label component that I already placed
i placed one button in a page .when click on that need to show
I have a label that I want to right align to be able to
I have placed an Image as a button in my App and I want
When a marker is placed, I want to call a PHP function (in another
i've placed a button on my dialog layout that i would like to trigger
I have a master page that references jquery + jqueryui. Everything is fine. In
I've learned asp.net from books available on the internet, but I didn't find a
I have a form where I placed my labels before inputs like this: <label
I have 3 radio buttons <div id=test> <input type=radio id=time1 name=radio value=1 /><label for=time1>Test

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.