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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:25:32+00:00 2026-05-20T07:25:32+00:00

When I am making an ajax call the controller is redirecting and not updating

  • 0

When I am making an ajax call the controller is redirecting and not updating my tags my code looks like as follows.

This is in the _layout.cshtml

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

And This is what the web config looks like, I have also tried turning off unobtrusive javascript off with no luck.

<code>
  <appSettings>
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
  </appSettings>
</code>

My controller method looks like this

<code>
   [HttpPost]
        public ActionResult Create(lesson lesson)
        {
            if (ModelState.IsValid)
            {
                //Save Album 
                lesson.dateCreated = DateTime.Now;
                lesson.dateSubmitted = DateTime.Now; 
                lesson.statusID = SUBMITTED;
                lesson.submittedByUserID = getAppUserID();
                lesson.prjLessonID = createLessonPrjID(lesson.projectID);


                storeDB.lessons.InsertOnSubmit(lesson);
                storeDB.SubmitChanges();
                return RedirectToAction("Index");
            }
            // Invalid – redisplay with errors 

            else
                return View(lesson); 

        }
</code>

Any ideas? Thanks in advance.

<code>
@if (item.statusID != null)
                {
                        <td id ="approvedmsg">@item.getLessonStatus(item.statusID.Value)</td>
                }
                else
                {
                       <td> </td>
                }

                @if (item.statusID != 3)
                {
                    <td>

                    @Html.ActionLink("Edit", "Edit", new { id = item.lessonID }) |
                    @Ajax.ActionLink("Delete", "Delete", new { id = item.lessonID }, new AjaxOptions { UpdateTargetId = "approvedmsg"})
                    </td>   
                }
</code>
  • 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-20T07:25:32+00:00Added an answer on May 20, 2026 at 7:25 am

    Try deleting MicrosoftAjax.js and MicrosoftMvcAjax.js and only use

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

    A good post about it here http://yobriefcase.posterous.com/unobtrusive-javascript-in-mvc3

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

Sidebar

Related Questions

I am making ajax call like this $(document).ready(function() { var abc = new Array();
I'm making an ajax call to fetch content and append this content like this:
I am including a jsp fragment by making an ajax call. Now this jsp
i am making ajax calls with jquery like this http://pastie.org/860837 and sometimes i get
I am making an ajax call to my controller which is going to perform
I am making a jquery ajax call to an mvc controller. I want to
Trying to find out why this jQuery JS isn't making ajax call though it
I am making this ajax call: $.ajax({ url: /test/whatever, type: 'post', contentType: 'application/json' data:
I have an ajax call that I'm making to the controller which should update
After making ajax call using Jquery to the vb.net server side code, I need

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.