I've the following c# code to place a carousel Control inside a Repeater :
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<table cellpadding="0" cellspacing="0" class="mycarousel">
<tr>
<td valign="top">
<a id="prev" class="myprev" href="#">
</a>
</td>
<td>
<div class="carousel_list">
<ul class="foo1" id="foo1">
<li>
<img id="img1" src="<%#Eval("IMG_SRC")%>" />
</a>
</li>
</ul>
<div class="clearfix">
</div>
</div>
</td>
<td valign="top">
<a id="next" class="mynext" href="#">
</a>
</td>
</tr>
</table>
</ItemTemplate>
</asp:Repeater>
</asp:Content>
CodeBehind :
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
FillOrder();
}
}
protected void FillOrder()
{
sqlcon.Open();
sqlcmd = new SqlCommand("select * from Table_1 Order By name", sqlcon);
da = new SqlDataAdapter(sqlcmd);
da.Fill(dt);
if (dt.Rows.Count > 0)
{
Repeater1.DataSource = dt;
Repeater1.DataBind();
}
sqlcon.Close();
}
and here's the result :
But what i want / hope to get is this :
that means put all names start with "A" into a carousel Control , with "B" into an other carousel Control ...etc
Please can anyone help me in this .