Hi,
i'm using an asp web form to show list of contacts; I would like to show also picture for contacts but I can retrieve entityimage_url but I'm not able to display the pic on the page.
Here's my asp code
<asp:GridView ID="Contacts" AutoGenerateColumns="false" runat="server"> <Columns> <asp:TemplateField HeaderText="Picture"> <ItemTemplate> <asp:Image ImageUrl='<%# "mycrmportal.crm.dynamics.com"+ Eval("entityimage_url")%>' runat="server" /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="First Name"> <ItemTemplate> <asp:Label Text='<%# Eval("firstname")%>' runat="server" /> </ItemTemplate> </asp:TemplateField> ....
And the c# code
protected void Page_Load(object sender, EventArgs e) { var xrm = new XrmServiceContext("Xrm"); var exampleContacts = xrm.ContactSet .Where(c => c.EntityImageId.Value!=null); Contacts.DataSource = exampleContacts; Contacts.DataBind(); .....
In my web page I get the Xsquare just like it tries to load an image but it can't.
Any suggestion?
Thanx!