473,322 Members | 1,614 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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 2263
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: New User | last post by:
asp.net framework 1.1 and 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...
0
by: John H. | last post by:
In effort to understand (Outlook) MAPI folder tree structure wrote simple linear code below to navigate tree. Successive "...Folders.GetNext()"'s return same folder at all levels of tree. What...
4
by: Tomek R. | last post by:
Hello ! This post does'nt regard column hyperlink. I just have single hyperlink and want to create it's NavigateUrl dynamically. This is my test page <form id="Form1" method="post"...
3
by: VB Programmer | last post by:
I have a datalist with a hyperlink in the Item Template. When I set the NavigateUrl simply to this, the databound CategoryId shows up fine: <asp:HyperLink id=hlLink runat="server"...
1
by: jeanluc.praz | last post by:
I created a user control containing containing a few hyperlinks. How can I change the NavigateUrl inside the user control ? So far I did the following: 1) In the custom control Public...
5
by: Vear | last post by:
Sorry, very Newbie question here. I don't know what I'm doing wrong. I have to use a <asp:hyperlink> to go to another page. I want to pick up the value in a text box. This is what I've tried and It...
7
by: Ibrahim. | last post by:
Hello, How can I access a Shared Folder of the Server by using the following control. 1. I need to download files from c:\resumes folde by using the following; <asp:HyperLink...
4
by: Aloysius Maria Selvam | last post by:
Hello, We have a problem in our web application. The error reported is given with in brackets : You can see the folder name "/Home/Controller/ getting repeated in the URL. For you information ...
6
by: Dmitry Duginov | last post by:
I have a FormView and a HyperLink on the page. If I use the following code behind (hooked up to Hyperlink's OnLoad event), it renders fine protected void link_Load(object sender, EventArgs e)...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.