?
Solved

Display varbinary(max)

Posted on 2011-02-16
4
Medium Priority
?
557 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
  • 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 2000 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

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

809 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