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

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Apr 2008
Posts: 10
Reputation: muthu raj is an unknown quantity at this point 
Solved Threads: 0
muthu raj muthu raj is offline Offline
Newbie Poster

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

 
0
  #1
Oct 28th, 2008
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..

  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.
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 370
Reputation: greeny_1984 is an unknown quantity at this point 
Solved Threads: 29
greeny_1984's Avatar
greeny_1984 greeny_1984 is offline Offline
Posting Whiz

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

 
0
  #2
Oct 31st, 2008
u r assigning imageurl to pic which i guess is image datatype in the table.
If u r query is achieved,mark the thread as solved

Live and Let Live
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC