Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

How can I pass two argument into JavaScript function id and name

$
0
0

Hi

I am trying to display to show the a message in a popup dialogue by passing the argument. Here is my code

<tr id="tr_@item.EmpDocID"><td>
               @Html.DisplayFor(modelItem => item.NewFileName)</td><td id="tdDelete_@item.EmpDocID"></td><a style="background-color: darkorange;" class="btn btn-primary form-control" data-toggle="tooltip"
                                                   onclick="ShowDeleteModalPopup(@item.EmpDocID,@item.NewFileName)" title="Click here to delete record"><i class="fa fa-trash-alt"></i><span class="padding-left-ten">Delete</span></a></td><div id="deleteConfirmationModal" class="modal fade" role="dialog"><div class="modal-dialog modal-sm"><!-- Modal content--><div class="modal-content text-info"><div class="modal-header"><input type="hidden" id="lblID" /><button type="button" class="close" data-dismiss="modal">&times;</button><h4 class="modal-title">Confirm Delete</h4></div><div class="modal-body"><p>Are you sure to delete the file <FileName from Table> ?  </p> // Here I want to show the selected filename from td column</div>  // Here the value should be shown from tf column.<div class="modal-footer"><button type="button" class="btn btn-default" id="btnDeleteConfirmed" onclick="DeleteDocument2();">OK</button>
                    @*<button type="button" class="btn btn-default" id="btnDeleteConfirmed" href="@Url.Action("Delete/"+Model)">OK</button>*@<button type="button" class="btn btn-default" data-dismiss="modal">Close</button></div></div></div></div>



Js Function

// I want to pass the value from EmpDocID and from @item.NewFileName

 function ShowDeleteModalPopup(id, filename) {
       
        $('#lblID').val(id);$('#lblfilename').val(filename);$('#deleteConfirmationModal').modal('show');
    }


 


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>