Asp.net Repeater İçindeki Html Kontrolü

Hasan Akpürüm

Kıdemli Yazılım Danışmanı

Asp.net Repeater İçindeki Html Kontrolü

Yayınlanma 01 Ocak 0001
Design ----------------------------------
<asp:Repeater ID="Rep1" runat="server"> <HeaderTemplate>     <table id="Table1" class="data"> </HeaderTemplate> <ItemTemplate>     <tr id="Row" runat="server">         <td>Item #1</td>         <td><asp:LinkButton ID="LinkButton1" OnClick="DoSomething"              Text="Item #2" runat="server" /></td>     </tr> </ItemTemplate> <FooterTemplate>     </table> </FooterTemplate>
CodeBehind ----------------------------------
foreach (RepeaterItem item in Rep1.Items) {     HtmlTableRow row = item.Controls[0].FindControl("Row") as HtmlTableRow;     foreach (HtmlTableCell cell in row.Cells)     {         if (cell.InnerText != string.Empty)         {             Response.WriteLine(cell.InnerText);         }     } }
Bol klavye tıkırtılı günler  ;-)
Yorum Yaz

Thanks, your message is sent successfully. We will contact you shortly!

Yorumu Gönder