07-28-04 11:10 PM
Hi,
I've written a custom image placeholder. I've overridden the Render
method, and have so far I've managed to write code to make the image
clickable, so that it the full image is shown in a new window, see
code below.
The problem is that the image shown on the posting isn't shown with
the correct aspect ratio. How might I do this? The ImagePlaceholder
doesn't have Height or Width properties?
protected override void Render(HtmlTextWriter writer)
{
ImagePlaceholder pImage = this.BoundPlaceholder as ImagePlaceholder;
writer.Write("<a href='" + pImage.Src + "' target='_blank'><img
src='" + pImage.Src + "' alt='" + pImage.Alt + "'</a> ");
}
[ Post a follow-up to this message ]
|