I have a form with a download field (and other fields) that a user can use to upload images and videos.
Form field for the download is called Media.
I am building a page to view the images using Razor script:
<h2>New Razor Script</h2>
@using System.Data
@using DotNetNuke.Entities.Users
@using DotNetNuke.Modules.UserDefinedTable
@{
int moduleId = 400;
int tabId = 35;
var ds = (new UserDefinedTableController(moduleId, tabId, new UserInfo())).GetDataSet(true);
}
<div id="slideShow">
<div id="slider">
<ul>
@foreach (DataRow row in ds.Tables["Data"].Rows)
{
<li>
<div class="slide">
<div class="content">
<h2>@row["Title"]</h2>
@row["Media"]
</div>
</div>
</li>
}
</ul>
</div>
</div>
When looking at the value for the Download field @@row["Media"], I get something like:
<!--cat2.jpg--><a href="/LinkClick.aspx?fileticket=XWvYKlg67X4%3d&tabid=21&portalid=0&mid=400" target="_blank">cat2.jpg</a>
The url or link "/LinkClick.aspx?fileticket=XWvYKlg67X4%3d&tabid=21&portalid=0&mid=400” shows the right image in a browser. However, I need to get the link only so I can use it in img tag. In otherwords, is there a way I could only get the
/LinkClick.aspx?fileticket=XWvYKlg67X4%3d&tabid=21&portalid=0&mid=400
And not
<!--cat2.jpg--><a href="/LinkClick.aspx?fileticket=XWvYKlg67X4%3d&tabid=21&portalid=0&mid=400" target="_blank">cat2.jpg</a>
Thank you.