Hi ramco1917,
Please refer below sample.
HTML
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<h1>Why-Why Analysis</h1>
<hr />
<b><u>Customers Data</u></b>
<asp:Repeater ID="rptCustomers" runat="server">
<ItemTemplate>
<div class="row">
<div class="col-lg-9 col-sm-9 col-xs-9 col-md-9">
<div class="row">
<div class="col-lg-3 col-sm-3 col-xs-3 col-md-3">
<i class='fa fa-arrow-right' style='font-size: 12px; margin-right: 5pt'></i><span>CustomerId:</span>
</div>
<div class="col-lg-9 col-sm-9 col-xs-9 col-md-9">
<asp:Label ID="lblCustomerID" runat="server" Text='<%#Eval ("CustomerId") %>'></asp:Label>
</div>
</div>
<div class="row">
<div class="col-lg-3 col-sm-3 col-xs-3 col-md-3">
<i class='fa fa-arrow-right' style='font-size: 12px; margin-right: 5pt'></i><span>Name:</span>
</div>
<div class="col-lg-9 col-sm-9 col-xs-9 col-md-9">
<asp:Label ID="lblName" runat="server" Text='<%#Eval ("Name") %>'></asp:Label>
</div>
</div>
<div class="row">
<div class="col-lg-3 col-sm-3 col-xs-3 col-md-3">
<i class='fa fa-arrow-right' style='font-size: 12px; margin-right: 5pt'></i><span>Country:</span>
</div>
<div class="col-lg-9 col-sm-9 col-xs-9 col-md-9">
<asp:Label ID="lblCountry" runat="server" Text='<%#Eval ("Country") %>'></asp:Label>
</div>
</div>
<h3><u>Effect Of incident</u></h3>
<p>In above data, The Customers Details fetched from database table.</p>
<p>Refer customers data.</p>
</div>
<div class="col-lg-3 col-sm-3 col-xs-3 col-md-3">
<asp:Image runat="server" ImageUrl="~/Images/Koala.jpg"/>
</div>
</div>
<hr />
</ItemTemplate>
</asp:Repeater>
Namespaces
C#
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
VB.Net
Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration
Code
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
this.BindRepeater();
}
}
private void BindRepeater()
{
string constring = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
using (SqlConnection con = new SqlConnection(constring))
{
using (SqlCommand cmd = new SqlCommand("SELECT TOP 1 CustomerId,Name,Country FROM Customers", con))
{
con.Open();
rptCustomers.DataSource = cmd.ExecuteReader();
rptCustomers.DataBind();
con.Close();
}
}
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If Not Me.IsPostBack Then
Me.BindRepeater()
End If
End Sub
Private Sub BindRepeater()
Dim constring As String = ConfigurationManager.ConnectionStrings("constr").ConnectionString
Using con As SqlConnection = New SqlConnection(constring)
Using cmd As SqlCommand = New SqlCommand("SELECT TOP 1 CustomerId,Name,Country FROM Customers", con)
con.Open()
rptCustomers.DataSource = cmd.ExecuteReader()
rptCustomers.DataBind()
con.Close()
End Using
End Using
End Sub
Screenshot