Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image when size by Percentage not showing

Status
Not open for further replies.

xenology

Programmer
May 22, 2002
51
US
I have an image control on an asp page that is not behaving correctly. When I specify a size by pixel, it shows as that size, however, if I specify as a percentage, there's no error, the page displays (all other info) but the image itself does not show. I can view source, copy and paste the image tag on a completely different page and it will show when that page is viewed. I'm wanting to specify by percentage because the original jpg's are huge and need to fit within the browser window without having to scroll around. Any ideas why using as percentage will not work?

This code works:
Dim img As New WebControls.Image
img.ImageUrl = "Prints/" + Request.QueryString("PrintName")
img.Height = Unit.Pixel(50)
img.Width = Unit.Pixel(50)
Me.PlaceHolder1.Controls.Add(img)


this code does not work:
Dim img As New WebControls.Image
img.ImageUrl = "Prints/" + Request.QueryString("PrintName")
img.Height = Unit.Percentage(50)
img.Width = Unit.Percentage(50)
Me.PlaceHolder1.Controls.Add(img)


thanks for any info!
-xeno
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top