July 2019
Intermediate to advanced
416 pages
10h 6m
English
Going back to our ASP.NET code, we can now hook up the searchDiscog function for retrieving our images. The first thing we need to do is include the reference to the search script:
<script src="~/js/discogHelper.js"></script>
With this in place, we can now expand our image section to include the search script:
<td> <img id="img_@index" width="150" height="150" /> <script type="text/javascript"> searchDiscog('@item.ResourceUrl', 'img_@index'); </script></td>
Putting this all together, our Index page now looks like this:
@{ ViewData["Title"] = "Home Page";}<div id="pageRoot"> <form asp-controller="Home" asp-action="Index" class="form-inline"> <div class="form-group mx-sm-3 mb-10"> <input type="text" ...Read now
Unlock full access