Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

Foreach to image url

$
0
0

I have to get the Id from each of the images below and tie them to an image...having a little trouble.

if (IsPostBack)
{
var qs = Request.QueryString["Id"];

var images = from p in db.AdImages
where p.AdId == qs
select p;

int count = images.Count();

FOREACH (ID IN images)

{

int ?? = ??

img.imageurl = image.aspx?Id= ???

}

<asp:Repeater ID="ImageRepeater" runat="server">
<ItemTemplate>
<asp:Image ID="Img" runat="server" />
</ItemTemplate>
</asp:Repeater>


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>