Databinder.Eval

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
 
J

Jos

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") %>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,218
Latest member
JolieDenha

Latest Threads

Top