0
我想在asp.net後增加新的,和我的HTML代碼如何動態地添加HTML裏控制中繼
<asp:repeater ID="Repeater1" runat="server" onitemdatabound="Repeater1_ItemDataBound">
<ItemTemplate>
<ul class="slider carousel" id="sliderName">
<li class="slide">
<div class="one-third column alpha portfolio-item">
<div class="content">
<div class="border">
<asp:Image ID="imgHotels" runat="server" Width="300px" Height="130px" class="scale-with-grid" />
<a href="" class="prettyPhoto zoom"></a>
<a class="link" href=""></a>
</div>
<center><h5 class="noline"><a href="#">
<asp:Label Visible ="false" ID="lblhotelid" runat="server" Text='<%#Eval("SrNo") %>'></asp:Label>
<asp:Label ID="lblhotelname" Visible="true" runat="server" Text='<%#Eval("hotelname") %>'></asp:Label>
</a></h5></center> <div class="shadow">
</div>
</div>
</div>
</li>
</ul>
</ItemTemplate>
,我怎麼能在這個代碼添加HTML控件li
?
if (repeat % 3 == 0)
{
HtmlGenericControl li = new HtmlGenericControl();//create the html control li
}
感謝,求助