Getting Result From JavaScript
I want to be able to get specific website thumbnails and display them in an ImageBox. The easiest I've found is using a web service. Unforntuantely, most of these services don't allow me to just attach a URL. If I could, then I would just assign the URL of the ImageBox as the URL.
Instead, they force me to use JavaScript like this:
Javascript Code:
<script type="text/javascript" src="http://webshot.in/thumbshot/getshot.php?url=http://www.shrunktheweb.com"></script>
I can do that, but how I would I get the results and assign it to the ImageBox's property?
Re: Getting Result From JavaScript
Would ASHX be interest you?It is also async.Have a look.
http://www.vbforums.com/showthread.php?t=623270
Post #8 of Gary.
Re: Getting Result From JavaScript
Man, I remember that thread :) That was a while ago :)
Things haven't really changed in this regard though, so the use of the ASHX is still valid. In the code behind for the Handler, you can make the request to the Web Service, get the image, and then render it to the page.
Job done :)
Gary
Re: Getting Result From JavaScript
May i add that is really slow regarding image from sql to page.
Gary that was the worst days as an asp.net beginner especially non css learner.Now it's easier since i have some understanding in CSS.Still no understanding whatsoever why Microsoft punished us by putting out iexplorer7 that i was working with those days.
Re: Getting Result From JavaScript
Quote:
Originally Posted by
sapator
May i add that is really slow regarding image from sql to page.
Really? That has not been my experience. How large are the images? It might be better to hold only the "address" of the image in the database, and store the image on the file system. The same ASHX can be used in this case. You might also want to think about caching the images to save the round trip.
Re: Getting Result From JavaScript
I was referring on holding the image to the database that renders it back reaaaally slow.The file system option is fast.
Re: Getting Result From JavaScript
Quote:
Originally Posted by
sapator
I was referring on holding the image to the database that renders it back reaaaally slow.The file system option is fast.
Agreed. This is where caching really comes into play, and can be very useful.
Gary