我需要有关在 asp.net 中的 ListView 控件的布局和绑定方面的帮助。我有一个目录页面,每页只能显示 6 张图片及其相关信息。
问题是这样的。我对如何创建布局有点困惑。
如果所有这些设计都是用一个 HTML 表格完成的,那么实现我想要完成的目标会相当容易,正如可以在此处看到的那样。
我正在使用 twitter 引导程序,并且设计不在表格中。下面是产生我想要的外观的代码。
<div class="categories row-fluid">
<div class="span4">
<div class="category1">
<img id="myImageHolder" runat="server" class="image1" alt="" src="../img/metal_candle.png" />
</div>
<div class="details">
<div class="button">
<button class="square" type="button">Add to Cart</button>
</div>
<ul>
<li>Description:</li>
<li>Colour:</li>
<li>Price:</li>
</ul>
</div>
</div>
<div class="span4">
<div class="category1">
<img class="image1" alt="" src="../img/metal_candle.png" />
</div>
<div class="details">
<div class="button">
<button class="square" type="button">Add to Cart</button>
</div>
<ul>
<li>Description:</li>
<li>Colour: </li>
<li>Price:</li>
</ul>
</div>
</div>
<div class="span4">
<div class="category1">
<img class="image1" alt="" src="../img/metal_candle.png" />
</div>
<div class="details">
<div class="button">
<button class="square" type="button">Add to Cart</button>
</div>
<ul>
<li>Description:</li>
<li>Colour: </li>
<li>Price:</li>
</ul>
</div>
</div>
</div>
<div class="categories row-fluid">
<div class="span4">
<div class="category1">
<img class="image1" alt="" src="../img/metal_candle.png" />
</div>
<div class="details">
<div class="button">
<button class="square" type="button">Add to Cart</button>
</div>
<ul>
<li>Description:</li>
<li>Colour: </li>
<li>Price:</li>
</ul>
</div>
</div>
<div class="span4">
<div class="category1">
<img class="image1" alt="" src="../img/metal_candle.png" />
</div>
<div class="details">
<div class="button">
<button class="square" type="button">Add to Cart</button>
</div>
<ul>
<li>Description:</li>
<li>Colour: </li>
<li>Price:</li>
</ul>
</div>
</div>
<div class="span4">
<div class="category1">
<img class="image1" alt="" src="../img/metal_candle.png" />
</div>
<div class="details">
<div class="button">
<button class="square" type="button">Add to Cart</button>
</div>
<ul>
<li>Description:</li>
<li>Colour: </li>
<li>Price:</li>
</ul>
</div>
</div>
</div>
如何使用 Listview,连同布局模板、项目模板和组模板来产生上述外观,同时还允许分页和数据绑定?
任何帮助或想法将不胜感激。