Posts Tagged ‘repeater’

Repeater control with multiple columns


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

<%#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;” />
</tr> </table>

How to find control with in repeater on button click event

December 10, 2013 Leave a comment

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


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





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 .