N
New User
asp.net framework 1.1, C#
I am trying to create thumbnail images dynamically and load them on a web
page. When I click on a thumbnail image it opens the large version of it.
I use DataList to display the images. All my images are in a folder call
‘CocoaImagesâ€. I have the following code in my DataList template to make data
bound and make the thumbnail images clickable. Thumbnail images are created
and displayed as expected. When I click on the small images I get 404 error
because I am missing ‘CocoaImages’ folder name in my navigateUrl.
My question is how can I add the folder name to NavigateUrl in the following
code so that the large images will display correctly when the smaller one is
clicked? Appreciate any help. Thanks
<ItemTemplate>
<asp:HyperLink Runat=’server’ ImageUrl=’<%#
string.Concat(“CreateThumbmail.aspx?file=cocoaimages/â€,DataBinder.Eval(Container.DataItem,
“Nameâ€)) %>’ NavigateUrl=’<%# DataBinder.Eval(Container.DataItem, “Nameâ€) %>’
ID=â€Hyperlink1â€>
</asp:HyperLink>
</ItemTemplate>
I am trying to create thumbnail images dynamically and load them on a web
page. When I click on a thumbnail image it opens the large version of it.
I use DataList to display the images. All my images are in a folder call
‘CocoaImagesâ€. I have the following code in my DataList template to make data
bound and make the thumbnail images clickable. Thumbnail images are created
and displayed as expected. When I click on the small images I get 404 error
because I am missing ‘CocoaImages’ folder name in my navigateUrl.
My question is how can I add the folder name to NavigateUrl in the following
code so that the large images will display correctly when the smaller one is
clicked? Appreciate any help. Thanks
<ItemTemplate>
<asp:HyperLink Runat=’server’ ImageUrl=’<%#
string.Concat(“CreateThumbmail.aspx?file=cocoaimages/â€,DataBinder.Eval(Container.DataItem,
“Nameâ€)) %>’ NavigateUrl=’<%# DataBinder.Eval(Container.DataItem, “Nameâ€) %>’
ID=â€Hyperlink1â€>
</asp:HyperLink>
</ItemTemplate>