Click here to Skip to main content
15,887,379 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,

i am in Vs2010,Windows Phone7 and Windows Azure Sql database(it is also same as sql database..there is no confusion).
1)i created table in winsow azure sql database as EMPLOYEE (Empno int,Ename varchar2,Eimage image) and inserted values also.
2)i created a wcf service to Get the table connected to database through the LINQ.
3)i designed a application to get the values in a list and dynamically.
for the i written xaml also
sample source:
XML
<ListBox x:Name="lstPerson" >
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical">
<TextBlock Text="{Binding Empno}"  />
<TextBlock Text="{Binding Ename}" />
<Image Source="{Binding Eimage}"/>
</StackPanel>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>


here i am not getting Image but getting Ename,empno. so please anybody help to me
how get the image from database into my windows phone application ?.

thanks in advance,
Posted
Updated 26-Jun-12 18:38pm
v2

Hi,

Check StackOverflow discussion[^] although it's WPF issue but you are also doing the same thing. Check the answer in given link.

hope it will solve your problem.

thanks
-Amit
 
Share this answer
 
i created a business object. in in this source tag i passed the business object.
inthat business object i converted image from binary to bit map that's all!.( )
 
Share this answer
 
Warning! This is not a topic I know anything about. That being said,

Since you are successfully retrieving Ename and Empno, it seems to me that you have no connection problems; you got that part right, and for me, that's usually the hardest part. My first question would be, does having a closing tag for StackPanel listed twice have an unintended result, causing the picture to not appear? It's not obvious why that would happen, but I've seen weirder things. My second question would be, does your StackPanel contain a holder for an image? And is it the right size? A web page will resize the image, if necessary, but I know nothing about mobile devices. Maybe they're a bit less flexible. As a little subtle thought, you say you're not getting Image, but your binding specifies Eimage as the name. Could it be a simple typo that's causing the problem?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900