Solved

Display varbinary(max)

Posted on 2011-02-16
4
548 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
Comment Utility
Check your file path while retrieving and saving.
0
 

Author Comment

by:bskyum
Comment Utility
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
Comment Utility
0
 

Author Comment

by:bskyum
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now