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

  • Home
  • SEARCH
  • 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'm working on a web page where I'm making an AJAX call that returns
I am making use of AJAX on my site and I would like to
I've rewritten my family web site using JavaScript (JQuery) making Ajax calls to PHP
I am making a request to a CGI program using AJAX. The response sends
What's the best practice for making sure that certain ajax calls to certain pages
I'm making a webpage with dynamic content that enters the view with AJAX polling.
Is there a norm for AJAX security? When making an XMLHttpRequest, if querying an
Making echo of a question around the web: Is the syntax for svn:ignore patterns
When making changes using SubmitChanges() , LINQ sometimes dies with a ChangeConflictException exception with
After making some changes in my models (eg. new field in a model 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.