|
| |
|
|
swoosh
Posts: 1428 Joined: 5/18/2002 From: Beaver Falls, PA Status: offline
|
Hyperlink/Image Control - 5/12/2008 21:47:31
Hi All, Have a database results page showing a few fields for each record including an image from the database. These images are not thumbnails but rather simply resized (I know I know) using the height and width property. The control used is a simple Image Control which allows for the resizing. However, when using this, I cannot make it a hyperlink to the details page of the property because the image control does not have a NavigateURL property to customize. Now if I use a Hyperlink control instead of an image control I can have the image as a hyperlink BUT CANNOT RESIZE THE IMAGE BECAUSE THE HYPERLINK CONTROL DOES NOT HAVE A HEIGHT AND WIDTH PROPERTY. So my question is: How does one have the image come in from the database (which can be resized) and also use it as a hyperlink to the details page. Thanks a bunch for at least reading and would appreciate any ideas
_____________________________
Swoooosh Just Do It!
|
|
|
|
swoosh
Posts: 1428 Joined: 5/18/2002 From: Beaver Falls, PA Status: offline
|
RE: Hyperlink/Image Control - 5/13/2008 7:48:27
Jaybee, I thank you for your assistance. I'm figuring that's how to do it but I need to know how to do it in ASP.NET......I can use the Hyperlink Control & also make it a link but no resize option. Just wondered if anyone knew how to put the image control inside of the ASP Hyperlink Template Control
_____________________________
Swoooosh Just Do It!
|
|
|
|
rdouglass
Posts: 9167 From: Biddeford, ME USA Status: offline
|
RE: Hyperlink/Image Control - 5/13/2008 8:43:44
quote:
image control inside of the ASP Hyperlink Template Control Its actually quite similar. You put it inside like this: <asp:HyperLink runat="server" ID="hyperSponsor" Target="_blank" >
<asp:Image runat="server" ID="imgSponsor" AlternateText="Click here to visit our sponsor's site." />
</asp:HyperLink>
Then you control the asp:Image tag as normal. Is that what you're looking for?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
swoosh
Posts: 1428 Joined: 5/18/2002 From: Beaver Falls, PA Status: offline
|
RE: Hyperlink/Image Control - 5/13/2008 8:54:13
Yes Roger I believe that's it.......but am I correct in stating that I would have to use the NavigateURL property for the hyperlink control AND the ImageURL property for the Image control>
_____________________________
Swoooosh Just Do It!
|
|
|
|
rdouglass
Posts: 9167 From: Biddeford, ME USA Status: offline
|
RE: Hyperlink/Image Control - 5/13/2008 10:56:12
Yes, you are correct. Are you using a codebehind page? I do something like this (using the link example I posted above) in ASP.NET: ... imgSponsor.ImageUrl = myImagePathAndName hyperSponsor.NavigateUrl = imgDisplayCompany1.ImageUrl ... That help any?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
swoosh
Posts: 1428 Joined: 5/18/2002 From: Beaver Falls, PA Status: offline
|
RE: Hyperlink/Image Control - 5/14/2008 19:17:35
Roger and Jaybee, Thanks so much for your assistance. It now works thanks to you guys.
_____________________________
Swoooosh Just Do It!
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|