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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:16:36+00:00 2026-05-23T11:16:36+00:00

Project Type: ASP.NET 3.5 Language : C# One of page uses Ajax Timer on

  • 0

Project Type: ASP.NET 3.5
Language : C#

One of page uses Ajax Timer on page load.So while execution start, I start the timer using

this.AjaxTimer.Enabled = true;

This is used to start execution of a time consuming code like,

protected void AjaxTimer_Tick(object sender, EventArgs e)
{
    //Disable the Ajax Timer, so that it won't execute again after 500 ms
    this.AjaxTimer.Enabled = false;

    for (int i = 1; i < 140000; i++)
    {
     // Code here
    }
}

How do I know whether the process is completed or running when I close the browser window using jQuery ?

OR

Simply, how can I know whether a server process is executing when I close the browser window? If it is running I want to abort it.

OR

How can I do the following stuff with jQuery

Script :

function abortRequest() {
    var obj = Sys.WebForms.PageRequestManager.getInstance();
    if (obj.get_isInAsyncPostBack()) {
        obj.abortPostBack();
    }
}

Markup:

<body style="background-color: Gray;" onunload="abortRequest();">
    <form id="form1" runat="server">
    </form>
</body>
  • 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-23T11:16:36+00:00Added an answer on May 23, 2026 at 11:16 am

    You may use the same code to test the whether server side script is running or not. But you may write the code inside document.ready function

    $(document).ready(function(){
        var obj = Sys.WebForms.PageRequestManager.getInstance();
        if (obj.get_isInAsyncPostBack()) {
            obj.abortPostBack();
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using MySql in my asp.net project. But I don't want to type every
I have a asp.net project that uses mvc-mini-profiler. I was using version 1.7 of
I created a new project of type Asp.net MVC 4 I installed the package
i am using asp.net framework 4 and i have created brand new project and
When I create a New Project of type ASP.Net MVC Web Application, I expect
I'm currently working on an ASP.NET 4.0 site using a project-less solution. By default
I wrote an asp.net website. I have a BLL project (meaning dll type project)
I am using ASP.NET Dynamic Data Entities project to generate a web application for
I have a project using Asp.Net 3.5 and MVC 1. Everything runs perfectly on
We just started a new ASP.Net project that uses web services to serialize some

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.