---
title: "Databinding with Repeater control in asp.net with C#."  
description: "Databinding with Repeater control in asp.net with C#."  
author: "Anonymous User"  
published: 2015-10-30  
updated: 2015-10-30  
canonical: https://www.mindstick.com/forum/33551/databinding-with-repeater-control-in-asp-dot-net-with-c-sharp  
category: ".net"  
tags: ["c#", "asp.net"]  
reading_time: 1 minute  

---

# Databinding with Repeater control in asp.net with C#.

i am [unable to bind](https://www.mindstick.com/forum/158088/unable-to-bind-a-view-with-the-complex-object-in-knockout-js) [data](https://www.mindstick.com/articles/13050/salesforce-aiming-to-dominate-predictive-analytics-with-data-science) in [Repeater](https://www.mindstick.com/blog/197/asp-dot-net-repeater-control) control [asp.net](https://www.mindstick.com/articles/934/default-folders-available-inside-the-asp-dot-net-application-folder) . how to do this please give me solution.

## Replies

### Reply by Anonymous User

A Repeater is a Data-bound control. Data-bound controls are container controls. It creates a link between the Data Source and the presentation UI to display the data. The repeater control is used to display a repeated list of items. It is server side control in asp.net.

```
  <asp:Repeater ID="Repeater1" runat="server">
        <HeaderTemplate>
            <table style="border: 1px solid #df5015; width: 500px" cellpadding="0">
                <thead>
                     <tr style="background-color: #df5015; color: White">
                    <th style="padding-left:10px;">ID
                    </th>
                    <th>Name
                    </th>
                    <th>Salary
                    </th>
                </tr>
                </thead>
        </HeaderTemplate>
        <ItemTemplate>
               <tbody style="background-color: #EBEFF0; border-top: 1px dotted #df5015; width: 500px">
                        <tr style="background-color: #EBEFF0">
                            <td style="padding-left:10px;">
                                <%#Eval("Emp_ID") %>
                            </td>
                            <td>
                                <%#Eval("Emp_Name") %>
                            </td>
                            <td>
                                <%#Eval("Emp_Sal") %>
                            </td>
                        </tr>

                </tbody>

        </ItemTemplate>
       <FooterTemplate>
           </table>
       </FooterTemplate>
    </asp:Repeater> string constr = ConfigurationManager.ConnectionStrings["forumConnectionString"].ToString(); // connection string            SqlConnection con = new SqlConnection(constr);con.Open();SqlCommand com = new SqlCommand("select *from Employee", con); // table name             SqlDataAdapter da = new SqlDataAdapter(com);            DataSet ds = new DataSet();            da.Fill(ds);  // fill dataset            Repeater1.DataSource = ds.Tables[0]; //set DataSource Repeater            Repeater1.DataBind(); //binding Repeater 
```

```

```


---

Original Source: https://www.mindstick.com/forum/33551/databinding-with-repeater-control-in-asp-dot-net-with-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
