1) It is used to display data in single column.
2) No Manipulation is allowed in data repeater.
3) There are no Paging
concept in data repeater
4) There are no default
templates.
Here we have Five Templates are applied on data repeater
1) Item Template
2) Alternating Item Template
3) Header Template
4) Footer Template
5) Separator Template
Disconnected approach for binding the data in data bound control
public partial class Default2 :
System.Web.UI.Page
{
protected void
Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack == false)
{
rep_bind();
}
}
private void
rep_bind()
{
SqlDataAdapter adp = new
SqlDataAdapter("Select
* from tbbook1", ConfigurationManager.ConnectionStrings["cn"].ConnectionString);
DataSet ds = new DataSet();
adp.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
}
No comments:
Post a Comment