标题:图片显示问题?
只看楼主
wdguozhen
Rank: 1
等 级:新手上路
帖 子:24
专家分:0
注 册:2006-12-6
结帖率:0
已结贴  问题点数:10 回复次数:4 
图片显示问题?
如何从数据库中读出的较大图片显示在固定大小的表格中?谢谢!
搜索更多相关主题的帖子: 如何 图片 
2012-09-19 20:13
跳过去
Rank: 8Rank: 8
等 级:贵宾
威 望:20
帖 子:282
专家分:976
注 册:2012-8-13
得分:5 
用层包住Image 控件

光棍中.....
2012-09-20 14:50
xunmi_love
Rank: 2
等 级:论坛游民
帖 子:204
专家分:18
注 册:2006-10-14
得分:5 
用CSS設定圖片的大小
把圖片放在DIV中,但是也要設定圖片的大小.要不還會出來的! 

低頭做人,擡頭做事。
2012-09-20 16:33
wdguozhen
Rank: 1
等 级:新手上路
帖 子:24
专家分:0
注 册:2006-12-6
得分:0 

 <asp:DataList ID="dlnew" runat="server" RepeatColumns="3" RepeatDirection="Horizontal">
                    <ItemTemplate>
                        <table border="0" cellpadding="0" cellspacing="0" style="width: 206px">
                            <tr>
                                <td style="width: 26px; height: 12px">
                                </td>
                                <td style="width: 180px; height: 120px">
                                    <asp:Image ID="Image1" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem,"guozhenUrl") %>' /></td>
                            </tr>
                            <tr>
                                <td style="width: 26px">
                                </td>
                                <td style="width: 180px">
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 26px; height: 12px">
                                </td>
                                <td align="left" rowspan="3" style="width: 180px; font-size: 9pt;" valign="top">
                                    名称:<%# DataBinder.Eval(Container.DataItem,"guozhenname") %><br />
                                    净含量:<%# DataBinder.Eval(Container.DataItem,"jhl") %><br />
                                    零售价:<%# DataBinder.Eval(Container.DataItem,"price") %><br />
                                    &nbsp;<asp:ImageButton ID="ImageButton1" runat="server" />
                                    <asp:ImageButton ID="ImageButton2" runat="server" /></td>
                            </tr>
                            <tr>
                                <td style="width: 26px">
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 26px">
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 26px">
                                </td>
                                <td style="width: 180px">
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:DataList>&nbsp;
如何从数据库中读出的较大图片显示在固定大小的表格中?如何修改代码?谢谢!
2012-09-20 16:47
wdguozhen
Rank: 1
等 级:新手上路
帖 子:24
专家分:0
注 册:2006-12-6
得分:0 
已解决,谢谢!
2012-09-20 17:29



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-381695-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.238677 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved