Archive

Posts Tagged ‘repeater’

Repeater control with multiple columns


VB.NET

<asp:Repeater ID=”rptimages” runat=”server”>
<HeaderTemplate>
<table border=”0″ cellpadding=”5″ cellspacing=”0″ width=”100%” style=”border-spacing: 0px;”>
<tr>
</HeaderTemplate>
<ItemTemplate>

<%#If((Container.ItemIndex <> 0 AndAlso Container.ItemIndex Mod 3 = 0), “</tr><tr>”, String.Empty)%>
<td align=”center”>
<asp:Image ID=”imghotel” class=”cellBorder” runat=”server” Style=”width: 100px; height: 90px;
margin: 0px; padding: 0px;” />
</td>
</ItemTemplate>
<FooterTemplate>
</tr> </table>
</FooterTemplate>
</asp:Repeater>

How to find control with in repeater on button click event

December 10, 2013 Leave a comment

<asp:Repeater ID=”RptInfo” runat=”server”>

<ItemTemplate>

<asp:Panel ID=”pnlReadonly” runat=”server”>

….

</asp:Panel>

</ItemTemplate>

</asp:Repeater>

Code : 

Protected Sub btnCancel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCancel.Click

Dim pnlReadonly¬†As Panel = DirectCast(RptSoccerInfo.Items(0).FindControl(“pnlReadonly”), Panel)

If (Not pnl Is Nothing) Then
‘ some code
End If

End Sub

Will add some more detail soon .