ALL ABOUT REPEATER CONTROL ASP.NET VB code for Repeater Control (program tested ok) <%@ Page Language="vb"
AutoEventWireup="true" %> <html> |
C# code (with code-behind-file) for Repeater (program tested ok) <%@ Page Language="C#"
AutoEventWireup="true" CodeFile="Default3.aspx.cs"
Inherits="_Default" %> <form id="Form1"
runat="server"> <HeaderTemplate> </tr> <ItemTemplate> <AlternatingItemTemplate>
</asp:Repeater> <br /> Total Records: </form> </body>
CODE in the Code-behiind-file:Default.aspx.cs
|
Efficiency of Repeater Control:
|
Syntax of Repeater Control Repeater control supports the following templates HeaderTemplate The Syntax: of Repeater Control <asp:Repeater id="idrepeater" runat="server" Datasource="<%# dataset %>" DataMember="table-inside-dataset">
</asp:Repeater> |
Meaning of DataBinder.Eval()
|
Repeater Example: <asp:Repeater
id="Repeater1" runat="server"> <a href="<%#DataBinder.Eval(Container.DataItem("empID"))%>"> </a> </li> |
Repeater Example: <asp:Repeater
id="Repeater1" runat="server">
<AlternatingItemTemplate> <font style="background-color:#f0f0f0"><a
href = "<%#DataBinder.Eval(Container.DataItem("empID"))%>"> </font> </AlternatingItemTemplate> <SeparatorTemplate>
<p>Thank
you</p> |
Sample code for Binding a Repeater with SQLServer:
cmd.CommandType
= CommandType.Text; DataSetds = new DataSet(); da.Fill(ds);
|
The things I learnt while I migrated from classic asp to asp.net is given here for my reference as well as for new beginners.
INDEX
-
▼
2009
(17)
-
▼
January
(17)
- The Very First Video Tutorial for ASP.NET C#
- Your First Csharp Code
- PHONE BOOK PROGRAM CODE IN ASP.NET CSHARP
- SINGLE DIMENTIONAL ARRAY C#
- TWO DIMENTIONAL ARRAY C# CODE
- ASP.NET CODING FOR REPEATER CONTROL
- ASP.NET-CSHARP-XML-AS-DATABASE
- LISTBOX LESSON 2 HOW TO MOVE DATA FROM LISTBOX TO ...
- ASP.NET-CSHARP-DROPDOWNLIST-EDIT FORM-SOURCE CODE
- What is AuotEventWireup and how to use it
- How to Create HyperLink in a Data Grid
- Login Form - Code in ASP.NET Csharp
- What is ADO.NET | Data Provider | DataSet
- CSHARP command parameter concepts
- Why @ symbol is used in string
- ExecuteScalar ExecuteReader ExecuteNonQuery : What...
- HASH TABLE VS SCRIPTING DICTIONARY
-
▼
January
(17)
ASP.NET CODING FOR REPEATER CONTROL
Related Links
Thanks for Your Visit
|
||
| ||
Disclaimer and Copy Right |