469,945 Members | 2,294 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,945 developers. It's quick & easy.

add folder name to navigateUrl

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=cocoaim ages/”,DataBinder.Eval(Container.DataItem,
“Name”)) %>’ NavigateUrl=’<%# DataBinder.Eval(Container.DataItem, “Name”) %>’
ID=”Hyperlink1”>
</asp:HyperLink>
</ItemTemplate>

Jul 22 '05 #1
1 2151
Hi,
http://www.aspfaq.com/5002
Ray at work

"New User" <Ne*****@discussions.microsoft.com> wrote in message
news:D2**********************************@microsof t.com...
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=cocoaimag es/" ,DataBinder.Eval(Container.DataItem, "Name")) %>' NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "Name") %>' ID="Hyperlink1">
</asp:HyperLink>
</ItemTemplate>

Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by John H. | last post: by
3 posts views Thread by VB Programmer | last post: by
5 posts views Thread by Vear | last post: by
7 posts views Thread by Ibrahim. | last post: by
4 posts views Thread by Aloysius Maria Selvam | last post: by
6 posts views Thread by Dmitry Duginov | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.