Databinder.Eval

  • Thread starter Thread starter m3ckon
  • Start date Start date
M

m3ckon

Hi there,

I'm a bit stuck on displaying items

I have a datalist which is populated by a datareader

In the datalist, I'm using the following to display an id:

<img src='<%#
DataBinder.Eval(Container.DataItem,"GalleryTitle",showimage.aspx?img={0}
) %>' />

This works fine, however I need to pull off another value from the db,
galleryid

and I need to pass this in the querystring of showimage.aspx as well as
the querystring img

How can this be done?? or do I have to do something else?

Regards,

M3ckon
 
m3ckon said:
Hi there,

I'm a bit stuck on displaying items

I have a datalist which is populated by a datareader

In the datalist, I'm using the following to display an id:

<img src='<%#
DataBinder.Eval(Container.DataItem,"GalleryTitle",showimage.aspx?img={0}
) %>' />

This works fine, however I need to pull off another value from the db,
galleryid

and I need to pass this in the querystring of showimage.aspx as well
as the querystring img

How can this be done?? or do I have to do something else?

Something like this (for VB):

<img src='<%# "showimage.aspx?img=" &
DataBinder.Eval(Container.DataItem,"GalleryTitle") &
"&id=" &
DataBinder.Eval(Container.DataItem,"GalleryID") %>
 
Back
Top