Repeater control in asp:Table : Table « ASP.net Controls « ASP.NET Tutorial

ASP.NET Tutorial
1. ASP.Net Instroduction
2. Language Basics
3. ASP.net Controls
4. HTML Controls
5. Page Lifecycle
6. Response
7. Collections
8. Validation
9. Development
10. File Directory
11. Sessions
12. Cookie
13. Cache
14. Custom Controls
15. Profile
16. Configuration
17. LINQ
18. ADO.net Database
19. Data Binding
20. Ajax
21. Authentication Authorization
22. I18N
23. Mobile
24. WebPart
25. XML
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
ASP.NET Tutorial » ASP.net Controls » Table 
3. 26. 2. Repeater control in asp:Table
<%@ Page Language="vb" %>
<%@ Import Namespace="System.Data" %>
<html>
<head>
   <title>List Control Example</title>
   <script runat="server">
      Sub Page_Load()
         MyRepeater.DataSource = CreateData()
         MyRepeater.DataBind()
      End Sub
      Function CreateData() As DataTable
         Dim DT As New DataTable()
         Dim Row1, Row2, Row3, Row4 As DataRow
         DT.Columns.Add(New DataColumn("name", System.Type.GetType("System.String")))
         DT.Columns.Add(New DataColumn("city", System.Type.GetType("System.String")))
         Row1 = DT.NewRow()
         Row1("name""A"
         Row1("city""B"
         DT.Rows.Add(Row1)
         Row2 = DT.NewRow()
         Row2("name""C"
         Row2("city""D"
         DT.Rows.Add(Row2)
         Row3 = DT.NewRow()
         Row3("name""E"
         Row3("city""F"
         DT.Rows.Add(Row3)
         Row4 = DT.NewRow()
         Row4("name""H"
         Row4("city""I"
         DT.Rows.Add(Row4)
         Return DT
      End Function
   </script>
</head>
<body>
   <h1>Control Templates Example</h1>
   <form runat="server">
      <asp:table id="MyTable" border="1" cellpadding="5" cellspacing="0" runat="server">
         <asp:tablerow runat="server">
            <asp:tablecell runat="server">
               Repeater Control:
            </asp:tablecell>
            <asp:tablecell runat="server">
               <asp:repeater id="MyRepeater" runat="server">
                  <headertemplate>
                     <h3>Famous Composers' Birthplaces</h3>
                     <table cellpadding="5" cellspacing="0">
                        <tr>
                           <td>Name<hr/></td>
                           <td>City<hr/></td>
                        </tr>
                  </headertemplate>
                  <itemtemplate>
                        <tr>
                           <td><strong><%# DataBinder.Eval(Container.DataItem, "name"%><strong></td>
                           <td><%# DataBinder.Eval(Container.DataItem, "city"%></td>
                        </tr>
                  </itemtemplate>
                  <footertemplate>
                     </table>
                  </footertemplate>
               </asp:repeater>
            </asp:tablecell>
         </asp:tablerow>
      </asp:table>
   </form>
</body>
</html>
3. 26. Table
3. 26. 1. asp:Table
3. 26. 2. Repeater control in asp:Table
3. 26. 3. Dynamically adding rows to the table (C#)
3. 26. 4. Create table programatically
3. 26. 5. Dynamically adding rows to the table (VB)
3. 26. 6. Using the new Caption attribute (C#)
3. 26. 7. TableRow and TableCell
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.