I have a table which contains some fields to show summarized data in "Complaint" controller's "Index" action. With clicking the id of a table data, I am showing the details of complaint in another controller's action. (Detail/Index)
The table that I listed summarized data is below.
@foreach (var item in Model)
{
<tr>
<td>
<a href="@Url.Action("Index", "Detail", new { id = item.Id })">
#
</a>
</td>
<td>@item.Employee.Name</td>
<td>@item.Dealer.Name</td>
<td>@item.Customer.Name</td>
When I click on the tag it correctly route me to Index page of Details controller with Id. What I want is instead of showing it on a new page, I want to show it inside a modal.
Details/Index page is below.
@foreach (var item in Model)
{
<div class="card-body">
<h5 class="card-title text-black-50 font-weight-bold text-center">Complaint Number : @item.ComplaintId</h5>
<hr />
<br />
<hr />
<p class="card-text">Employee Name : @item.Complaint.Employee.Name</p>
<p class="card-text">Phone Number : @item.Complaint.Employee.Phone</p>
<p class="card-text">City: @item.Complaint.Employee.City </p>
<p class="card-text">E-mail: @item.Complaint.Employee.Email </p>
}
<p class="card-text">Dealer Name : @item.Complaint.Dealer.Name</p>
<p class="card-text">Phone Number : @item.Complaint.Dealer.Phone</p>
<p class="card-text">City: @item.Complaint.Dealer.City </p>
<p class="card-text">E-mail: @item.Complaint.Dealer.Email </p>
}
I found this topic which have almost an equal problem with me but I couldn't figure it out.
Getting Bootstrap's modal content from another page
I am using bootstrap 4 btw since I saw some comments that bootstrap 4 deleted something about remote modal or smth like that.
Thank you for your kind help and time.