Click here to Skip to main content
15,921,694 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my image is store in database now i want to view that image in asp.net form how can do that??

lblregCode.Text = dtall.Rows[0]["regCode"].ToString();
lblname.Text = dtall.Rows[0]["username"].ToString();
userimg = dtall.Rows[0]["userimage"].ToString();

//userimg is image control and in database i have taken userimage as varchar datatype
so now how i can fetch the image here???
Posted
Updated 27-Nov-12 22:04pm
v3
Comments
pryashrma 28-Nov-12 5:37am    
instead of storing image..u can upload it in particular folder and save image url in database, and then simply bind imageUrl in image control... like
imgPhoto.ImageUrl=dtall.Rows[0]["userimgUrl"].ToString()

you have to use http handler if you store image in binary format in database.
 
Share this answer
 

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