Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

315
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda