Click here to Skip to main content
15,892,480 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
if (FileUpload1.HasFile)
 {
     using (BinaryReader reader = new BinaryReader                  (FileUpload1.PostedFile.InputStream))
     {
     (FileUpload1.PostedFile.ContentLength);
         imagedata = new byte
                  [FileUpload1.PostedFile.ContentLength];
         HttpPostedFile uploadedImage = FileUpload1.PostedFile;
         uploadedImage.InputStream.Read
            (imagedata, 0, (int)FileUpload1.PostedFile.ContentLength);


     }


then save to db . can't to display. gridview dispaly gridview {system Byte[]}
dont show image to gridview.
image filed to db is varbinary(max)
Posted
Updated 15-Sep-11 11:36am
v2
Comments
Herman<T>.Instance 15-Sep-11 14:03pm    
and your problem is?
saeed1364 15-Sep-11 14:04pm    
is my problem

For displaying images through grid view, you need to write a handler file for that.

http://www.aspnettutorials.com/tutorials/database/saving-retrieving-image-cs.aspx[^]


I hope this link will do for what are you looking for.
Enjoy.....
 
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