Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

313
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda