Hi Nathan,
Ive found this same problem, in an online catalog where there was a
thumbnail of product images which should be hyperlinks to the individual
product pages.
There were three ways i've gotten around this, the first is to the text
property of your hypelink control as an image (kinda kludgey):
> lnkImage.Text = "<img src='" & ResolveUrl("~/images/someimage.gif") & "'
> width=150>"
The next is to directly handle the image control in the hyperlink, which i
only did once or twice, but got it working, something kind of like (not 100%
sure about the sytanx here):
> lnkImage.ImageUrl = ResolveUrl("~/images/someimage.gif")
> Dim img As Image = lnkImage.Controls(0)
> img.Width = New Unit(150, Pixels)
The way i usually do this though is to edit the HTML code and do something
like the following:
<asp:hyperlink id=lnkImage runat=server
navigateurl="~/index.aspx?m=f&id=123">
<asp:image id=imgImage runat=server imageurl="~/images/someimage.gif"
width="150px"></asp:image>
</asp:hyperlink>
Hope this helps, its all workarounds, but they work. You could always
subclass the hyperlink control and override its render event, but these are
easier.
Cheers,
- Arthur Dent.
"Nathan Sokalski" <> wrote in message
news:e$...
>I am using the ImageUrl property of the Hyperlink control to create a
>graphical Hyperlink. However, I want to change the size of the image I am
>using, but the generated HTML places the width/height properties in the
>anchor tag rather than the image tag. Obviously I could write code to
>generate the anchor/image tags myself, but when a control as nice as the
>Hyperlink already exists I want to know if there is any kind of workaround
>that will let me use the Hyperlink control. Any ideas?
> --
> Nathan Sokalski
>
> http://www.nathansokalski.com/
>