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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:35:31+00:00 2026-05-24T10:35:31+00:00

I am very new to web development (about a month) and i have run

  • 0

I am very new to web development (about a month) and i have run into something strange.

I am using VS2010, MVC 3 Razor to create a simple app.

I have two tables holding the same type of information. As in both table A and Table B hold users. the Difference being, Table A has users who are in the “Role”, and table B holds the users who are not in the “Role”.

Both tables have two columns, One with the user name, the other holds a Ajax.ActionLink.

So, to add a user to Table “B”, I click the “Ajax.Actionlink” on Table “A”. The “add” is save through the MVC action, and i move the Table Row using AjaxOption OnSuccess event. The OnSuccess event basically, moves the Row, and alters the Ajax.ActionLink so the newly added User row’s ActionLink will Remove the User.

I hope that’s clear.

This all works fine. I can add user “A” to the table “A” and everything works fine. I can remove user “A” from table “A” to table “B” and everything is fine. But I can not re-add User A to table “A”. The OnSuccess runs, so the row is move, but the Action event is not called. So if i refresh the screen i can see the move did not actually take place. it is the same if i start with User “B” on table “B”. Also, a page refresh (F5) does not fix the links, the remain broken until i close and reopen the page.

Everything looks good in the HTML, it shows in the status bar that when i click the link, the correct href is being called, but fiddler registers no call and the action is not called.

I suspect i have some sort of binding issues, but i am lost here. Everything works fine in Firefox

Please help. Code below, with Comments added. Remember this works to add and remove, remove and add, but re-add and re-remove only calls the function but does not call the Action. So i know the Actions are spelt correctly etc.

//// element is the ID of the element i am Moving
//// targetElement is the ID of the tbody i am moving the element to
function move_element(element, targetElement) {
    try 
    {
       //// get the HTM 
       var elementHTML = $("tr[id=" + element + "]").children(".Action").html();
       //// based on the tbody id
       switch (targetElement) 
       {
       case "AssignedToGroup":
            //// Change the target body for next call to this function
            elementHTML = elementHTML.replace("AssignedToGroup", "UnassignedToGroup");
            //// change th action name
            elementHTML = elementHTML.replace("AddGroupRole", "DeleteGroupRole");
            //// change the display label
            elementHTML = elementHTML.replace("Assign", "Remove");
            break;
       case "UnassignedToGroup":
            elementHTML = elementHTML.replace("UnassignedToGroup", "AssignedToGroup");
            elementHTML = elementHTML.replace("DeleteGroupRole", "AddGroupRole");
            elementHTML = elementHTML.replace("Remove", "Assign");
            break;
     }
     //// Create the new Ajax <td> element
      $("tr[id=" + element + "]").children(".Action").replaceWith("<td  class='Action'>" + elementHTML +  "</td>")
      //// Add the row to the other body
      $("tr[id=" + element + "]").appendTo($("tbody[id=" + targetElement + "]"));
   }
   catch (e) 
   {
     alert(e.Message); ////NO ERROR IS RAISED
   }
}
  • 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-24T10:35:31+00:00Added an answer on May 24, 2026 at 10:35 am

    I was looking at a similar issue you have had and found a solution here: Cache issue with Ajax.ActionLinks
    To summarize:

    • One suggestion was to call this: $.ajaxSetup({ cache: false }); If
      you are using unobtrusive javascript support for jquery.
    • Another suggestion was to use "HttpMethod = "POST" in the
      AjaxOptions.

    Anyways hopefully this may help you or someone else, so I posted it here.

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

Sidebar

Related Questions

So I am very new to web development and have a .NET MVC site
Am very to new to web development. I have the web pages; web pages
I'm very new to web development, have many years background on the desktop, but
I am very new to Web development, and have been writing some javascript that
I still very new using Subversion. Is it possible to have a working copy
I am very new to web development and the use of Open Source. I
I am new to web development and WCF. I am reading some basics about
So I am very new to web development and working on a new project
We are about to implement new practices for our mvc web applications and although
I'm very new to web development; but I've created a webpage/game in Silverlight. I'm

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.