产品,相册展示列表样试

CSS :

.xr_list dl { float:left; margin-top:10px;margin-left:12px;width:160px;border:1px solid #76C9E5; }
.xr_list dt { height:168px; margin:0 auto; }
.xr_list dt img { height:162px;width:154px; background:#E5E5E5; padding:3px;border:0px;}
.xr_list dd { height:22px; line-height:22px; width:158px; color:#000; margin:0 auto;}
.xr_list a { color:#fff;}
.xr_list a:hover { text-decoration:underline;}


 

 前台:

 <asp:Repeater runat="server" ID="repeater">
            <ItemTemplate>
                <div class="xr_list">
                    <dl>
                        <dt><a href='#'>
                            <img src='<%#Eval("Temimagepath") %>' alt='<%#Eval("Temname") %>' /></a></a></dt><div class="clear"></div>
                        <dd style="background:#F0F0F0;">
                            <a href='#' style="color:red;float:left;margin-left:15px;">预览</a><a href="#" style="color:#000;float:right;margin-right:15px;">应用模板</a>
                        </dd>
                         <dd>
                           &nbsp;&nbsp;编号:<%#Eval("Temcode") %></dd>
                           <dd>&nbsp;&nbsp;分类:<%#AccessDAL.TemplateType.GetModels(Convert.ToInt32(Eval("Temtype")))%></dd>
                     </dl>
                </div>
            </ItemTemplate>
        </asp:Repeater>

 

 

 后台:

 try
   {
                List<Model.TemplateType> lis = new AccessDAL.TemplateType().GetList();
                if (lis.Count != 0)
                {
                    repeater1.DataSource = lis;
                    repeater1.DataBind();
                }
            }
            catch (Exception)
            { }
 

posted @ 2011-03-14 15:42  葛福财  阅读(174)  评论(0编辑  收藏  举报