473,322 Members | 1,736 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.

Linking to a url from an image in a datagrid

hi guys,

i have a datagrid which contains several records each of which has an
image. i want to be able to click on the image and open the image in a
larger version in a separate window. At present this works fine. my
issue is that the asp:hyperlink tag as opposed to the asp:image tag
displays images in the grid at their normal size and not at the size i
specify e.g. Width="70" Height="50" - see below.

does anyone know of a way around this ????

thanks in advance

<asp:TemplateColumn HeaderText="Image">
<ItemTemplate>
<asp:hyperlink ImageUrl='<%#
FormatURL(DataBinder.Eval(Container.DataItem, "product_image")) %>'
Width="70" Height="50" NavigateUrl=www.tes.com Runat=server
ID="Image1"/>
</ItemTemplate>
</asp:TemplateColumn>
Nov 19 '05 #1
1 921
cs********@hotmail.com (Colin Graham) wrote in
news:ee**************************@posting.google.c om:
my
issue is that the asp:hyperlink tag as opposed to the asp:image tag
displays images in the grid at their normal size and not at the size i
specify e.g. Width="70" Height="50" - see below.


Try adding the control in the ItemDataBound event handler of the
datagrid... it might work better if it's in code?

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: DraguVaso | last post by:
Hi, I have an inherited DataGrid, that does lots of extra stuff. For exemple drawing a backgroundimage in every cell. The problem is that it's taking too much time (using gdi+), so I want to do...
5
by: chrisse_2 | last post by:
Hi, All the records in my database will contain at least one picture. At the moment all the images are part of the database as ole objects although the database is way to big and there is only...
1
by: Jim Hammond | last post by:
The code below implements two datagrid columns that display images. The first column is just a test that always displays the same image directly from a file. The second column pulls the image from...
4
by: nicholas | last post by:
How can I show or hide an image in a datagrid depending on a field. Something like: if myfield <> "" then 'show image' else 'show noimage.gif' end if the image field contains the image name...
2
by: SQL_Klovn | last post by:
Hi! I have been struggeling for quite some time now with a stupid problem which drives me crazy. I have Datagrid, where I load some images from a SQL2000 database. This works fine, but I am not...
13
by: Neo Geshel | last post by:
I have examined about 80+ different upload scripts on the 'net, both in VB and C#, and none seem to do what I need them to do. Perhaps someone here can point me somewhere that Google hasn't...
1
by: ltt19 | last post by:
Hi everyone! I want to do da Image gallery using just the datagrid, this one will dilpays only images, no text, that means that it will have about 4 Collumns that will displays just images from...
0
by: Tim::.. | last post by:
Please, please, please help!!! I have a datagrid that displays a list of contacts on our intranet site using the ActiveDirectory as it's main Data Source. I want to be able to show an image of...
0
by: rockdale | last post by:
Hi, All: I dynamic add an arrow up/down image in OnItemDataBound event for my datagrid, it works fine. But I have another textbox which trigger postback and doing something, after this event get...
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: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.