Google Answers Logo
View Question
 
Q: Inserting the same image as button in all rows of DATAGRID hyperlink column ( No Answer,   2 Comments )
Question  
Subject: Inserting the same image as button in all rows of DATAGRID hyperlink column
Category: Miscellaneous
Asked by: kysrsosay-ga
List Price: $5.00
Posted: 05 Aug 2005 08:35 PDT
Expires: 04 Sep 2005 08:35 PDT
Question ID: 552082
ASP.net - I have a hyperlink column in a datagrid which is populated
from an access database.  Instead of showing each unique URL link (ie
www.google.com) in the datagrid for every row in the column, I just
want to have a 'GO.gif' image file represent the link for every row on
the column. (ie. You click on the 'Go' image, and it brings you to
www.google.com)
Answer  
There is no answer at this time.

Comments  
Subject: Re: Inserting the same image as button in all rows of DATAGRID hyperlink column
From: spamania-ga on 05 Aug 2005 15:05 PDT
 
It seems like your best bet would be to use a TemplateColumn instead
of a HyperlinkColumn.  Define the template as an asp:HyperLink object
with the NavigateURL property hooked into your dataset and the
ImageURL property set to your image.

Here are two relevant websites.  The first (see method #4) descibes
using a TemplateColumn as a workaround for a HyperlinkColumn.  The
second is Microsoft's documentation for the Hyperlink object.

http://www.c-sharpcorner.com/Code/2003/June/DataGridHyperLinkColumn.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuiwebcontrolshyperlinkclasstopic.asp

Hope that helps. :)

Nate
Subject: Re: Inserting the same image as button in all rows of DATAGRID hyperlink column
From: kysrsosay-ga on 07 Aug 2005 12:01 PDT
 
Thanks..My 8 hours of googling couldn't come up with that simple fix. 
Appreciate the help!!

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy