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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:18:22+00:00 2026-05-23T17:18:22+00:00

I have a global variable in my javascript, whose value I want to set

  • 0

I have a global variable in my javascript, whose value I want to set again from the response I get from server after calling the server through $.post(). I use the following code at the server side and write the variable QS to the Response Stream after clearing it. So, according to me nothing should be there in the Response except that variables’s value.

The code:-

Response.Clear();
Response.Write(QS);
HttpContext.Current.ApplicationInstance.CompleteRequest();

But what is happening is, the variable’s value is there in the Response in the beginning but then other things are appended to the Response. I just want the variable’s value and nothing else.

When I have Called CompleteRequest(), then from where these extra things are getting added to the Response ?

Please help..

  • 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-23T17:18:23+00:00Added an answer on May 23, 2026 at 5:18 pm

    Try to use the following code:

        Response.Clear();
        Response.Write(QS);
        Response.End();
    

    Does this work for you?

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

Sidebar

Related Questions

I have a set of global counter variables in Javascript: var counter_0 = 0;
How can I define a global javascript variable in this situation? I want the
I have a javascript function (function1) that checks some global variables (can the user
If i have global variable in A.dll, that depends on global variable in B.dll
I have a global variable that is an instance of my custom class. How
I have a global pointer variable char* pointer = new char[500]; /* some operations...
If I have a global static variable x like in this code #include <stdio.h>
In following program . I have one doubt. I have declared one global variable
I have used a static global variable and a static volatile variable in file
I have a header file variable.h where i declare all my global variable.Then i

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.