Reputation: 35
I'm currently battling to retrieve an image from SQL Server 2008 R2 in an asp web application using vb.net. The image is stored in the SQL Server 2008 R2 database as an image type. I've been researching for the past few days and can't seem to find anything solid on this topic. Apparently, the image has to be retrieved using a http handler, and then then image control's imageurl property needs to reference that?
What kind of item needs to be added to the project for this .ashx page?
Please can someone post me some code for both the http handler and the aspx page using vb.net.
Thanks in advance
Upvotes: 1
Views: 1533
Reputation: 754368
You don't have to use a HTTP handler - there are other ways to do this. But using an HTTP handler is an elegant and quite nice way to achieve this.
Read these resources - they should you step-by-step how to achieve this:
Upvotes: 1