Necesito agregar un cuadro desplegable o de lista en lugar del comentario del modelo agregado en la vista. amablemente sugiera cualquier otro método alternativo ya que soy nuevo en esto
Código HTML:
@model Sampleapplication.Models.samplemodel <body> <table id="tabledetails" class="table table-bordered loaded-table"> <thead> <tr> <th> <p>Id</p></th> <th> <p>Name</p></th> <th> <p>Department</p></th> </tr> </thead> <tbody></tbody> </table> </body>sobre el éxito de ajax:
success: function (data) { $.each(data, function (i, item) { var rows = "<tr>" + "<td class='prtoducttd1'>" + item.Id + "</td>" + "<td class='prtoducttd2'>" + item.Name + "</td>" + "<td class='prtoducttd11'>@Html.ListBoxFor(m => m.sDepartmentList, Model.lstToDepartment, new { Name = "Departmentlst", id = "Departmentlst", @placeholder = "Select Deaprtment" })</td>" + "</tr>"; $('#tabledetails tbody').append(rows);