Understanding Repeater Controls in ASP.NET

ASP.NET Repeater Control is one of the control in List control, the other two being DataList control and DataGrid control. List control is extensively used in web applications to show a list of data such as strings or data items from the database. The list of data may not be displayed in the web application because this will take more space. If you place a list control such as drop down list in a web application, you can contain all the data in one control.


ASP.NET Repeater Control is the easiest one of the list controls to create. It is simply adding a numbers of items underneath each other. This type of control will be ideally suited for displaying a list of hyperlinks in a web application. You can use the ASP.NET Repeater Control by creating templates that defines the layout of the control's content. A template can contain any grouping of HTML text and controls that are applicable on a Web Forms page. While running the application you cannot view the ASP.NET Repeater Control if not even a single template is defined, or if none of the templates contain elements.

The ASP.NET Repeater Control supports four types of templates: ItemTemplate, AlternatingItemTemplate, HeaderTemplate and FooterTemplate, and SeparatorTemplate. A ASP.NET Repeater Control does not have any default look. You have to define the way how the information should look like. Therefore, it is possible for you to display items in a ASP.NET Repeater Control in a table layout, in a comma-delimited list, in a bulleted list or in a numbered list.

The ASP.NET Repeater Control will not render the result unless you bound it to a data source through its DataSource property. The ASP.NET Repeater Control supports several events such as ItemCreated, ItemCommand, ItemDataBound, Load, and Unload. These events help developer to create an event when the user clicks the button.

_______________________________________________________________________

Add to My Yahoo!


FREE Subscription

Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.

Name:
Email:

Note : We never rent, trade, or sell my email lists to
anyone. We assure that your privacy is respected
and protected.

Visit .NET Programming Tutorial Homepage

______________________________________________________

Recommended Resource

| What is the need for Bridge Pattern in C#? | What is the need for Builder Pattern in C#? | What is the need for Chain of Responsibility Pattern in C#? | What is the need for Command Pattern in C#? | What is the need for Composite Pattern in C#? | What is the need for Decorator Pattern in C#? | What is the need for Flyweight Pattern in C#? | What is the need for Interpreter Pattern in C#? | What is the need for Iterator Pattern in C#? | What is the need for Mediator Pattern in C#? | What is the need for Memento Pattern in C#? | What is the need for Prototype Pattern in C#? | What is the need for State Pattern in C#? | What is the need for Strategy Pattern in C#? | What is the need for Template Method Pattern in C#? | What is the need for unsafe code in C#? | What is the purpose of assert() in C#? | What is the purpose of AutoResetEvent in .NET? | What is the purpose of Console.ReadLine() in C#? | What is the purpose of machine.config file in .NET? |


| Privacy Policy for www.dotnet-guide.com | Disclosure | Contact |

Copyright - © 2004 - 2017 - All Rights Reserved.