943,640 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 2130
  • ASP.NET RSS
Oct 28th, 2008
0

image not displaying in grid view form sql server & ASP.NET. anyone help me if u knw?

Expand Post »
i have a page in which i m using grid control to display data from sql server. i have two
fields in my table.name,image in which image datatype is image.i m using an sqldatasoure for
data binding.when i run my page image not displayed in my page.only name field is displayed.
what is the problem here?give me any suggestion? thanks in advance...

i used following ASP.NET code here..

asp.net Syntax (Toggle Plain Text)
  1. <form id="form1" runat="server">
  2. <div>
  3. <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:uploadConnectionString %>"
  4. SelectCommand="SELECT * FROM [image]"></asp:SqlDataSource>
  5. <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
  6. Style="z-index: 100; left: 82px; position: absolute; top: 146px" Width="270px">
  7. <Columns>
  8. <asp:BoundField DataField="name" HeaderText="name" SortExpression="name" />
  9. <asp:ImageField DataImageUrlField="pic" HeaderText="picture" >
  10. </asp:ImageField>
  11. </Columns>
  12. </asp:GridView>
  13.  
  14. </div>
  15. </form>



output like this:


name picture

sunset here emptybox

waterlilies empty box
Last edited by peter_budo; Oct 29th, 2008 at 7:23 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
muthu raj is offline Offline
10 posts
since Apr 2008
Oct 31st, 2008
0

Re: image not displaying in grid view form sql server & ASP.NET. anyone help me if u knw?

u r assigning imageurl to pic which i guess is image datatype in the table.
Reputation Points: 25
Solved Threads: 29
Posting Whiz
greeny_1984 is offline Offline
372 posts
since Apr 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: What is a DLL?
Next Thread in ASP.NET Forum Timeline: Problem with Crystal Report in ASP.NET





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC