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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:51:04+00:00 2026-06-12T21:51:04+00:00

if(window.XMLHttpRequest) { request = new XMLHttpRequest(); } else { request = new ActiveXObject(Microsoft.XMLHTTP); }

  • 0
if(window.XMLHttpRequest) {
        request = new XMLHttpRequest();
    } else {
        request = new ActiveXObject("Microsoft.XMLHTTP");
    }

request.open('GET', 'foo.php?bar=' + baz, true);
request.send()

I know that this can be done with PHP, but I’d like to know if/how it can be done with aspx (i.e. request.open('GET', 'foo.aspx?bar=' + baz, true);). In the example above, the AJAX call is being made in javascript from a plain old HTML page (not PHP), but it can interact with PHP.

Can the same thing be done with aspx? If so, do I need to target the code behind file or not? Say that the aspx is only there to respond to requests like this, is there something to put in the aspx file that automatically passes the GET to the vb/cs file?

Any help would be appreciated. I’m just more accustomed to working with PHP, but my current job is primarily a VB shop, so PHP comparisons are welcomed. Thanks.

  • 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-12T21:51:05+00:00Added an answer on June 12, 2026 at 9:51 pm

    Aspx was not meant to work this way.

    You will need to catch the ajax call on the Load event of the page, and then Response.Write whatever you want to return as a string. Then you have to set the Response.ContentType and then you need to end it with Response.End.

    It is complicated and a bit of a hack.

    Your best option is to start learning asp net mvc which will most likely work similarly to any php mvc framework.

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

Sidebar

Related Questions

why won't this work? function login(){ if(window.XMLHttpRequest){ ajax=new XMLHttpRequest(); }else if(window.ActiveXObject){ ajax=new ActiveXObject(Microsoft.XMLHTTP); }
if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject(Microsoft.XMLHTTP);
function text_window() { var xmlDoc; if (window.XMLHttpRequest) { xmlDoc=new window.XMLHttpRequest(); xmlDoc.open(GET,cd_catalog.xml,false); xmlDoc.send(); xmlDoc=xmlDoc.responseXML; }
I am sending data to a PHP site using the following code: if (window.XMLHttpRequest)
function ajax_request(destination_full_url) { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp
window.open() why window.open always pop up with IE , I set firefox is the
Window.open javascript function is not working in Mozilla, but working in other browsers, here
the window.open() object has some funky parameter list... is there a way to do
Iam trying to encode url of the xmlhttprequest method as utf-8 var Url=(http://localhost/day1/tryconnect.php?add=+address) ;
I'm trying to get this function to work, which does a request for parameter

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.