Solved

Display varbinary(max)

Posted on 2011-02-16
4
552 Views
Last Modified: 2012-05-11
Hello, i made a fileupload in aspx.

when i upload a photo (.jpg or .png) i can see in my database the value of my cell changes from NULL to <binary data>.

When i try to display the data in my gridview <asp:imagefield it display the 'missing picture sign'.

i selected right, and i tried to upload very small pictures, but nothing helps.
<asp:ImageField DataImageUrlField="ComLogo" SortExpression="ComLogo">
                <HeaderStyle Font-Size="20" />
                <ItemStyle CssClass="Discountlogo" Height="100px" Width="100px" />
</asp:ImageField>

Open in new window

0
Comment
Question by:bskyum
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 6

Expert Comment

by:kswathi
ID: 34905269
Check your file path while retrieving and saving.
0
 

Author Comment

by:bskyum
ID: 34905346
I checked the file path.

If i in my selection string delete aspnet.ComLogo and type 'test', the test is displayed in my column. (I changed the imagefield to a boundfield).

And when i leave the aspnet.ComLogo alone in a boundfield, it displayes:

System.Byte[]
0
 
LVL 19

Accepted Solution

by:
Manoj Patil earned 500 total points
ID: 34905585
0
 

Author Comment

by:bskyum
ID: 34942970
i actually haven't wrote anything in my codebehind yet.

I make the sqldatasource in the aspx. and this codeproject is made in aspx.cs
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question