I use AD Gallery. but my images is in folder that name equal product create date.
Every model’s images is in @Model.Date.Value.ToShortDateString() named folder. In this code img src=”” works, but href=”” does not work:
<div class="ad-thumbs">
<ul class="ad-thumb-list">
<li>
<a href="http://localhost:20234/Products/Images + @Model.Date.Value.ToShortDateString() + @Model.ImagePath1">
<img src="@Url.Content( Path.Combine( "~/Products/Images/", @Model.Date.Value.ToShortDateString(), @Model.ImagePath1 ) )" width="42" height="42" alt=""/>
</a>
</li>
</ul>
</div>
I also tried
<a href="Path.Combine("http://localhost:20234/Products/Images", @Model.Date.Value.ToShortDateString(), @Model.ImagePath1)">
...
</a>
and
<a href="~/Products/Images" + @Model.Date.Value.ToShortDateString() + @Model.ImagePath1">
...
</a>
In AD Gallery down small images seems, but large images does not opens.
How can I write href link to open large images?
use
Url.ActionAlso read Razor code between double quotes
Update 1:
From MSDN:
You provided 3 parameters.
or
to use
Path.CombineUPDATE 2:
UPDATE 3: