开发者

how to show image proper format?

开发者 https://www.devze.com 2023-04-12 00:45 出处:网络
I retrieve name and image from database that name and image are come in aspx as the requirement but problem is that image show one line only like \"[image][image][image][image]\"this format but i want

I retrieve name and image from database that name and image are come in aspx as the requirement but problem is that image show one line only like "[image][image][image][image]"this format but i want 2x2 image

aspx code :

<asp:Repeater ID="reapterclient" runat="server" OnItemDataBound="repeaterclient_OnItemDataBound">
                                            <ItemTemplate>
                                            <table width="645" align="left" cellpadding="8" cellspacing="01" border="0" bgcolor="#252525">
                                            <tr bgcolor="#lclclc" height="开发者_如何学Go40">
                                            <td id="tdcollection" width="50%" align="center" valign="middle" class="general"><asp:Image ID="imgClient" runat="server" ImageUrl='<%#"~/clients_images/"+Eval("Client_Logo") %>' Visible="true" Height="67" Width="380"/><br />
                                            <asp:Label ID="lblimgClient" runat="server" Text='<%#Eval("Client_Name") %>' Visible="true"></asp:Label>
                                            </td>


                                            </tr>
                                            <tr>
                                            <td colspan="2"/>
                                            </tr>

                                            </table>
                                            </ItemTemplate>


                                </asp:Repeater>

cs code :

public void binddata()
        {
            SqlDataAdapter sda = new SqlDataAdapter("select Client_Name,Client_Logo from tp_Client_Master where (Project_Type like '%commercial%')",con);
            DataSet ds = new DataSet();
            sda.Fill(ds);
            reapterclient.DataSource = ds;
            reapterclient.DataBind();
        }


Try,

<asp:Image 
      ID="imgClient" 
      runat="server" 
      ImageUrl='<%# Eval("Client_Logo","~/clients_images/{0}") %>'
0

精彩评论

暂无评论...
验证码 换一张
取 消