Hello,
I created an ASP.NET Core 1.1 MVC Web Application in Visual Studio 2017 Community.
I am trying to replace the first image in the carousel on the Home page with a link coding from my Microsoft affiliate account.
Here is what the original Index.cshtml first item code looks like:
<div class="item active"><img src="~/images/banner1.svg" alt="ASP.NET" class="img-responsive" /><div class="carousel-caption" role="option"><p> Learn how to build ASP.NET apps that can run anywhere.<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkID=525028&clcid=0x409"> Learn More</a></p></div></div>
Here is the code that I get from the affiliate website:
<script type="text/javascript"> var uri = 'https://impus.tradedoubler.com/imp?type(img)g(11111111)a(2222222)' + new String(Math.random()).substring(2, 11); document.write('<a href=https://clk.tradedoubler.com/click?p=333333&a=2222222&g=44444444 target="_BLANK"><img src="' + uri + '" border=0></a>');</script>
I tried to modify the code for the first carousel image to look like this:
<div class="item active"><img src="https://impus.tradedoubler.com/imp?type(img)g(1111111)a(2222222)" + new String(Math.random()).substring(2, 11) border=0 alt="ASP.NET" class="img-responsive" /><div class="carousel-caption" role="option"><p></p></div></div>
It displays the image, but it does not allow me to click it for the destination URL and the navigation arrows and dots do not appear correctly. This is what it looks like:
I understand that the original image that is displayed is the wwwroot\images\banner1.svg file. I do not want to replace that file. I want to replace the image that is displayed in the carousel.
Does anyone know how I can get this coding to work as one of the items in the carousel?
Thanks,
Tony