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

134
Vistas
how do I call model in Javascript ajax
@using Models.Model
@model Models.Model.SocialMedia

 $(function () {
            $('#Button_Click').on('click', function () {
                /*var media = $(".action-post").val();*/
               
                $.ajax({
                    type: "POST",
                    url: '@Url.Action("Index")',
                    datatype: "json",
                    data: {SocialMedia},
                    success: function (data) {
                        $(".downlines").html(data.MediaList);
                        $(".txt.post").html(data.FullName);
                        $(".departmen.post").html(data.Departmen);
                        $(".article").html(data.Message);
                       /* $('.downlines').html(data);*/
                    }, error: function (data) {
                        alert("hatalııı");
                    }

                });
            });
        });

This is my javascript code.Above is my model.In order to send data from data to httppost, I need to write the model to the data.I wrote the name of my model directly, but it did not accept. Where is my mistake?

about 4 years ago · Juan Pablo Isaza
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