Hi friends,
I want to know about repeater control? How does it work in Asp.net?
Thank you
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted May 8, 2012, 5:46 PM EDT
The Repeater control is used to display a repeated list of items that are bound to the control.
Please refer the below link
http://www.w3schools.com/aspnet/aspnet_repeater.asp
Here I will show you how to display picture in repeater control along with data.
Program
First create a table student
Create table student (sid varchar(50),sname varchar(50),saddress varchar(50), smarks int,pic varchar (50))
Store the picture in the program folder and save there name in pic column of the table with there extension like (.gif,.jpg,.bmp)
Default.aspx code
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
Default.aspx.vb code
Imports System.Data.SqlClient
Imports System.Data
Partial Class _Default
Inherits System.Web.UI.Page
Dim strConnString As String = System.Configuration.ConfigurationManager.ConnectionStrings.Item("ConnectionString").ToString()
Dim con As New SqlConnection(strConnString)
Dim com As SqlCommand
Dim str As String
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
con.Open()
str = "select * from student"
com = New SqlCommand(Str, con)
Dim reader As SqlDataReader
reader = com.ExecuteReader
Repeater1.DataSource = reader
Repeater1.DataBind()
reader.Close()
con.Close()
End If
End Sub
End Class
Thanks
If this post helps you mark it as answer
SenthilkumarRank #387 · 6.5K reputationPosted May 8, 2012, 7:33 PM EDT
Please refer this tutorial.
http://www.aspnettutorials.com/tutorials/controls/repeater-csharp.aspx
Jignesh TrivediRank #16 · 50.3K reputationPosted May 8, 2012, 8:50 PM EDT
For repeater control please refer,
http://www.codeproject.com/Articles/6130/A-Grouping-Repeater-Control-for-ASP-NET
http://www.c-sharpcorner.com/uploadfile/puranindia/repeater-controls-in-Asp-Net/
If you use .net 3.5 or above, use Listview control instead of Repeater control.
hope this help.
V S N Raju KanumuriRank #8,839 · 215 reputationPosted May 8, 2012, 9:00 PM EDT
see these links
http://www.c-sharpcorner.com/uploadfile/puranindia/repeater-controls-in-Asp-Net/
http://www.dotnetcurry.com/ShowArticle.aspx?ID=663
hope this will help to U