From: Husam on
Hi Every Body:

I am wondering if there is a way to retrive URL for website and pass it as
imageurl, so when the Image control renderd by the server the image would be
the website that I assigned its URL to imageurl.

any help will be apprecited

regard's

Husam
From: Brian Cryer on
"Husam" <Husam(a)discussions.microsoft.com> wrote in message
news:9866CE3C-ECFB-4003-A027-00B080796858(a)microsoft.com...
> Hi Every Body:
>
> I am wondering if there is a way to retrive URL for website and pass it as
> imageurl, so when the Image control renderd by the server the image would
> be
> the website that I assigned its URL to imageurl.

Yes and No, but mostly no.

An image control can display only an image, so you would need to generate an
image of the website and render up that image. Now in theory yes this is
possible. You can generate images on the fly (you point the imageurl to a
page on your site and the page generates an image not html - so generating
images on the fly is achievable although there are some hoops to jump
throw).

To generate an image of a website is more tricky. If it were a desktop
application (which obviously it isn't) then I would use an embedded
web-browser, browse to the site and when its finished loading save a image
snapshot. You can't use an embedded web-browser in your server code, it just
won't work, so you'd probalby be looking at a desktop application to
generate the image communicating with your back-end website. Achievable, but
a lot of work and much easier if you don't have to generate images in
real-time, so if you queued up the sites you needed and then have your
desktop application work through the list generating images for each,
allowing your server to serve up only those images which you've already
generated.

Alternatively there do seem to be a number of services out there which will
generate an image for you. I've not used any so can't recommend, but google
for "website snapshot" and that turns up a lot of hits.

> any help will be apprecited

Hope this helps.
--
Brian Cryer
http://www.cryer.co.uk/brian