Click here to Skip to main content
15,893,266 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my current web application, I am using a generic handler to retrieve an image from SQL 2005 db and display it on an image control (asp.net 3.5, vb). At a later stage, I want to retrieve the same image shown on the image control and store it in another sql2005 db. In between the user might also change image. I want to retrieve whatever image is shown on the image control.
How can I achieve this?
Posted
Comments
sravani.v 21-Apr-12 5:25am    
I think you can retrieve ImageUrl from ImageControl. Retrieve it and store in database

1 solution

These article should get you going:
Image Handling In ASP.NET[^]
Storing Binary Files Directly in the Database[^]

At any given time, either you have the image url or the image binary. Use either to process and store.
 
Share this answer
 
Comments
GeoNav 21-Apr-12 6:41am    
So, it means that when I use ImageUrl property, the generic handler will render the same image, which I can convert to a Byte array and store in the database. Is it correct?
Sandeep Mewara 21-Apr-12 7:13am    
Yes, it should be like that. Do confirm me too once you try.
GeoNav 22-Apr-12 4:35am    
I am not able to get the image in bytearray from the generic handler. Any thoughts?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900