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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:17:54+00:00 2026-05-31T05:17:54+00:00

I am using Asp.net MVC3 and trying to do a simple Ajax post to

  • 0

I am using Asp.net MVC3 and trying to do a simple Ajax post to the server which returns a partial view and updates my list of items during a search.

    @using (Ajax.BeginForm("PartialUpdate", "Listing"
        , new  AjaxOptions { 
                UpdateTargetId = "ListPartialDiv",
                HttpMethod = "GET",
                InsertionMode = InsertionMode.Replace,

        }))
    {
        <!-- Search Boxes and buttons here -->
    }

    <div id = "ListPartialDiv">
        @{
            Html.RenderPartial("_ListPartial", Model);
         }
    </div>

The ajax successfully makes a call to the server and the server responds by sending a partial view. But the partial view always renders in a new page. I found out that this is because it doesn’t know that it is an ajax call coming and so it renders a new page. I HAVE included the correct jquery-ubobtrusive-ajax.min.js scripts and added the key as follows according to This Question

    <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"> 

My controller code is very simple:

      if (Request.IsAjaxRequest())
          return PartialView("_ListPartial", list);

      return View("Index", list);

But Request.IsAjaxRequest() always returns false no matter what.
I have also used fiddler and firebug according to This Question and don’t see the X-Requested-With header but I can’t really figure out what that means or how to change it. The only thing I can think of is that every other example I see uses an older version of jquery. Does that have anything to do with it? Thanks for any 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-31T05:17:55+00:00Added an answer on May 31, 2026 at 5:17 am

    You’re including the unobtrusive-AJAX script before jQuery, so none of your scripts are working.

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

Sidebar

Related Questions

I'm trying to create a simple CalDav server using ASP.NET MVC 3, but the
I am new to ASP.NET MVC3 and trying desperately to just get something simple
I am trying to learn MVC using ASP.NET MVC3. Most of the tutorials I
I am trying to set the initial values for a list box using asp.net
I'm trying to write a really simple prototype of a CMS system using ASP.Net
I'm trying to implement exception handling in ASP.NET MVC3 using the HandleError attribute. The
We're using ASP.NET MVC3 with Razor View engine and standard HTML and jquery on
I'm using Entity Framework in an ASP.NET MVC3 application and I'm trying to use
Using ASP.Net MVC3 with C#. Currently I am trying to pass a single database
I am trying to output the following URL using the ASP.Net MVC3 framework and

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.