Have you tried something like:
<asp:Image ID="Image1" runat="server" ImageUrl='<%#
DataBinder.Eval(Container.DataItem, "PIN") %>.jpg' />
If that doesn't work, you can actually make it into a method:
<asp:Image ID="Image1" runat="server" ImageUrl='<%# AddSuffix(
DataBinder.Eval(Container.DataItem, "PIN") ) %' />
protected string AddSuffix(object urlPart)
{
return (string)urlPart +".jpg";
}
Peter
--
Site:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
Short urls & more:
http://ittyurl.net
"sc***@metrohealth.org" wrote:
I am using Visual Studio 2005.
I have the following code in my DataList:
<asp:Image ID="Image1" runat="server" ImageUrl='<%#
DataBinder.Eval(Container.DataItem, "PIN") %' />
This brings up the following graphic: http://localhost/PhysicianDirectory/017871
How can I write the ImageURL so that the result would be:
http://localhost/PhysicianDirectory/images/017871.jpg