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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:13:08+00:00 2026-05-16T04:13:08+00:00

how can I detect if a request is an AJAX-request (from jQuery) on the

  • 0

how can I detect if a request is an AJAX-request (from jQuery) on the server-side of a ASP.net application. I don´t want to do this: mypage.aspx?this_is_ajax=true…

ex.

$.get("mypage.aspx");

On the server side I want to do certain things when the request is a ajax request…

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-05-16T04:13:09+00:00Added an answer on May 16, 2026 at 4:13 am

    ASP.NET MVC had a great extension for this, that did work with JQuery. It checked it this way:

    Check the core collection:

    request["X-Requested-With"] == "XMLHttpRequest"
    

    Check the headers collection (ensuring its not null):

    request.Headers["X-Requested-With"] == "XMLHttpRequest"
    

    It did it as an extension method, so you could recreate it, or use it if you are using ASP.NET MVC through Request.IsAjaxRequest().

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

Sidebar

Related Questions

How can I detect which request type was used (GET, POST, PUT or DELETE)
I need to know how I can detect the current application pool I am
Assuming Windows, is there a way I can detect from within a batch file
How can I detect when an Exception has been thrown anywhere in my application?
We're building a set of external web services to be consumed client-side (using jquery/AJAX)
If all tables I want to delete from have the column gamer_id can i
I want to trigger an ajax request when the user has finished typing in
Hi everyone I am working on an Ajax web chat and this application is
How can I detect at the startup of the application that a client doesn't
Is there a Regular Expression that can detect SQL in a string? Does anyone

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.