navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Hyperlink/Image Control

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Expression Web Help >> Hyperlink/Image Control
Page: [1]
 
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!

jaybee

 

Posts: 13959
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Hyperlink/Image Control - 5/13/2008 5:44:38   
quote:

page
Scuse me if I'm totally confuzzled here but whatever code you're using to produce the image from that database ends up writing

<img src="blah blah blah" width="nn" height="nn" /> to the page? If so, wrap that in
<a href="URL" alt="img desc" title="where we going?"> existing img src here </a>
The URL could also be pulled from the database.

If all images are resized the same then you could use CSS to do it

.imagesized {height:50px; width:90px;}

<img class="imagesized" src="...........

< Message edited by jaybee -- 5/13/2008 5:52:32 >


_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to swoosh)
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!


(in reply to swoosh)
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.

(in reply to swoosh)
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!


(in reply to swoosh)
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.

(in reply to swoosh)
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!


(in reply to swoosh)
Page:   [1]

All Forums >> Web Development >> Expression Web Help >> Hyperlink/Image Control
Page: [1]
Jump to: 1





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