Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

314
Views
How to convert this Ajax ActionLink to Url Action or Something Similar?

I have the following Ajax ActionLink code:

render: function (data, type, row) {
    return '@Ajax.ActionLink("Confirm", "Edit", "ResidencyConfirmation",
        new { Id = data, ApplicationId = row.Id },
        new AjaxOptions { UpdateTargetId = "SubItemContainer",
            OnSuccess = "onShowSubItemSuccess",
            InsertionMode = InsertionMode.Replace },
        new { @class = "btn btn-primary" })';
}

This code is supposed to render buttons called "Confirm" in a jQuery datatable column. When one of the "Confirm" buttons is clicked, it is supposed to pass two Id parameters and then display a modal dialog. This functionality works if I hardcode the Ids, such as Id = new Guid("guid-value-here"), row.Id = new Guid("guid-value-here")

The challenge is that I am unable to pass the data and row.Id values as parameters.

I have been successful at passing data and row.x parameters using Url Actions, such as the following example:

render: function (row) {
    var applicationDetails = '@Url.Action("Details", "Application")/' + row.Id;
    return '<a href=\"' + applicationDetails + '\" class=\"btn btn-info\ fa fa-folder-open"></a>';

How can I convert my Ajax ActionLink to a Url Action or something similar to perform the same functionality?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!