You can't. These values aren't available at that time because the image
itself isn't loaded into the form. All it's doing is telling the browser
where to get the image from. The width and height can be set independantly
of the image. For example. you can specify a 100 pixel width for an image
even though it's a 1 pixel spacer. Essentially though, getting the image
value won't do you any good in an Image webcontrol because, since the image
is never really opened server-side, the server doesn't actually know the
size of the image. You would have to open it as a bitmap using some of the
System.Drawing classes to really open the image first in order to find the
size.
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
"karimL" <no************@ligne-bleue-cyber.com> wrote in message
news:40**************@ligne-bleue-cyber.com...
Hi,
how can I retrieve the height and width of
a System.Web.UI.WebControls.Image after populating it's ImageUrl property.
It's seems not to be filled ?
Does someone have a solution ?
Thanks
Karim