Introduction
In this article, I will demonstrate how to dynamically bind repeater control in asp.net from the database. The chart controls enable you to create ASP.NET pages or Windows Forms applications with simple, intuitive, and visually compelling charts for complex statistical or financial analysis.
- Dynamically Bind DataListControl in Asp.Net from Database - Part One
- Dynamically Bind DetailsViewControl in Asp.Net from Database - Part Two
- Dynamically Bind FormViewControl in Asp.Net from Database - Part Three
- Dynamically Bind GridViewControl in Asp.Net from Database - Part Four
- Dynamically Bind ListViewControl in Asp.Net from Database - Part Five
- Dynamically Bind RepeaterControl in Asp.Net from Database - Part Six
Step 1
Create database table in sql server 2014.
- CREATE TABLE [dbo].[StudentMarks](
- [ID] [int] IDENTITY(1,1) NOT NULL,
- [StudentName] [nvarchar](50) NULL,
- [TotalMarks] [int] NULL,
- CONSTRAINT [PK_StudentMarks] PRIMARY KEY CLUSTERED
- (
- [ID] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
- ) ON [PRIMARY]
- GO
- CREATE PROCEDURE spGetStudentMarks
- AS
- BEGIN
- SELECT StudentName,TotalMarks from [dbo].[StudentMarks]
- END
Screenshot database table
Step 2
Open Visual Studio 2015 click on New Project and create an empty web application project.
Screenshot for creating new project 1
After clicking on New Project one window will appear, select Web from left panel choose ASP.NET Web Application give a meaningful name of your project then click on OK as shown in below screenshot.
Screenshot for creating new project 2
After clicking on OK one more window will appear, choose Empty, check on Web Forms checkbox and click on OK. As shown in the below screenshot.
Screenshot for creating new project 3

Scott HungPosted Aug 7, 2024, 3:54 AM
Would you please email source codes to [email protected] if possible? Many Thanks!
srinivas prabhuPosted Jan 6, 2022, 11:38 AM
It's working fine but i want to display values along with the portions in pie chart whenever the user place the cursor point on the particular portion ... is it possible
Rushabh ShahPosted Apr 11, 2020, 8:35 PM
Absolutely not working when used with MasterPages
CP SolutionsPosted Jul 19, 2019, 10:28 AM
Kindly help in creating chart on the basis of selected list box item, like i select 'a' and 'b' in list box, i want 'a' and 'b' graph at run time
Rohit PardeshiPosted Jun 28, 2018, 3:55 AM
Giving an error at series.Points.AddXY(rdr["StudentName"].ToString(),??rdr["TotalMarks"]);