Hi chetan,
Please take reference the below code and correct your code.
If you want to display multiple news for that you have to use Datalist or Repeater control.
Database
For this sample I have used of NorthWind database that you can download using the link given below.
Download Northwind Database
HTML
<div>
<h1 class="main-module-title">
Recent <span>News</span></h1>
<asp:DataList runat="server" ID="dlNews">
<ItemTemplate>
<div class="row-fluid">
<div class="row">
<div class="col-xs-12 col-sm-3 col-md-3">
<a href="#">
<asp:Image runat="server" ID="ImgNews" class="img-responsive img-box img-thumbnail"
ImageUrl="~/photo/Desert.jpg" />
</a>
</div>
<div class="col-xs-12 col-sm-9 col-md-9">
<h4>
<a href="#">
<asp:Label ID="newsheader" runat="server" Text='<%#Eval("EmployeeID")%>'></asp:Label></a></h4>
<p runat="server" style="text-align: justify" id="newscontent">
</p>
</div>
</div>
<hr />
</div>
</ItemTemplate>
</asp:DataList>
</div>
Namespaces
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
string constr = ConfigurationManager.ConnectionStrings["Constring"].ConnectionString;
using (SqlConnection con = new SqlConnection(constr))
{
using (SqlCommand cmd = new SqlCommand("Select Top 10 EmployeeID From Employees", con))
{
using (SqlDataAdapter da = new SqlDataAdapter(cmd))
{
DataTable dt = new DataTable();
da.Fill(dt);
this.dlNews.DataSource = dt;
this. dlNews.DataBind();
}
}
}
}
}