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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T22:06:43+00:00 2026-06-18T22:06:43+00:00

Hi I have problem with my MVC application. I would like click on ActionLink

  • 0

Hi I have problem with my MVC application.
I would like click on ActionLink > load data from server > and insert data to div in same page.
But my code still loads content on new page and I don`t have idea why. Anybody to help me ?

This is my Index.cshtml in HomeController,

    @model IEnumerable<Kango_kmen.KangoKmenWS.WSEntityInfo>
    @Content.Script("jquery-1.9.1.min.js", Url)
    @Content.Script("jquery.unobtrusive-ajax.min.js",Url)
    @Content.Script("jquery.unobtrusive-ajax.js",Url)
    @Content.Script("myScript.js",Url)

    @section Entities{


    <table>
    <tr>
    <th>
      <input type="submit" value="zobrazit" />
    </th>
    <th>
        iD
    </th>
    <th>
        name
    </th>

    </tr>

    @foreach (var item in Model) {
    <tr>
    <td>
    @Ajax.ActionLink("..", "CheckEntity", new { id = item.iD }, 
            new AjaxOptions{ UpdateTargetId="properties",
                             HttpMethod="GET",
                             InsertionMode=InsertionMode.InsertAfter,
            })
    </td>
    <td>            
        @Html.DisplayFor(modelItem => item.iD)
    </td>
    <td>
        @Html.DisplayFor(modelItem => item.name)
    </td>

    </tr>  
    <tr>
     <td>
         <div id="properties">

         </div>
     </td>
    </tr>
     }
    </table>
     }


     @section PropertyInfo{
     <p>Property info</p>
     } 

     @section Properties{
     <p>properties</p>
     }

And here is my Controller in HomeController

    public PartialViewResult CheckEntity(int id)
    {

        var model = WSConnect.getEntityInfo(id);
        if(model !=null){
            return PartialView("CheckEntity", model.property);
        }
        var modell = new WSEntityInfo[0];
        return PartialView("CheckEntity", modell);
    }

and ChecktEntity is the Partial view but everytime I click on ActionLink controller load url: /Home/ChceckEntity/1000 for exmaple on view data on this new page “(

  • 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-06-18T22:06:44+00:00Added an answer on June 18, 2026 at 10:06 pm

    There are 2 things wrong with your code:

    1. You have included the jquery.unobtrusive-ajax.js script twice, once the minified version and once the standard version. You should include it only once
    2. The jquery.unobtrusive-ajax.js is not compatible with jquery 1.9.1 because one of the breaking changes in jQuery 1.9 is that the .live() method was removed and the jquery.unobtrusive-ajax.js script relies on it. If you look at your javascript console you would see the following error: The .live method is undefined.. So if you want to use the unobtrusive AJAX functionality in ASP.NET MVC you will have to downgrade the version of jQuery. For example the 1.8.3 version should be fine.

    So:

    @model IEnumerable<Kango_kmen.KangoKmenWS.WSEntityInfo>
    @Content.Script("jquery-1.8.3.min.js", Url)
    @Content.Script("jquery.unobtrusive-ajax.min.js", Url)
    @Content.Script("myScript.js", Url)
    

    Also please learn how to debug your javascript code. Use a tool such as FireBug or Chrome developer toolbar where all those errors will be shown.

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

Sidebar

Related Questions

I have an application in Asp.net MVC where at some point I would like
I would like to have my Spring MVC application mapped to the following extension
I'm migrating an application from ColdFusion to ASP.Net MVC and have a little problem
I am new to MVC. i have problem to pass data from view to
I have an ASP.NET MVC 3 web application, which I would like to publish
I have a problem with my MVC 4 Application. I have a Model with
i have a problem with session in my webapplication (asp.net mvc rc2). the application
I have ASP.NET MVC application that has list with jQuery Selectable list. My problem
I'd like to implement ASP.Net MVC application which could have controllers, views and content
I have successfully implemented MVC bundling for my MVC application. There is one problem

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.