Hi ramco1917,
Please refer below sample.
HTML
<asp:Repeater ID="rptData" runat="server">
<HeaderTemplate>
<table>
<tr>
<td></td>
<td>PlanID</td>
<td>PlanName</td>
<td>PlanCountry</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><span runat="server" id="lnkBook">
<a href='#' target='_blank' style='text-decoration: none; display: <%#Eval("PlanID").ToString() == ""?"block":"none"%>'>-</a>
<a href='#' target='_blank' style='display: <%#Eval("PlanID").ToString() != ""?"block":"none"%>'>Word Meaning</a>
</span>
</td>
<td>
<asp:Label ID="lblId" Text='<%#Eval("PlanID") %>' runat="server" /></td>
<td>
<asp:Label ID="lblName" Text='<%#Eval("PlanName") %>' runat="server" /></td>
<td>
<asp:Label ID="lblCountry" Text='<%#Eval("PlanCountry") %>' runat="server" /></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
Namespace
C#
using System.Data;
VB.Net
Imports System.Data
Code
C#
protected void Page_Load(object sender, EventArgs e)
{
if(!this.IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[] {
new DataColumn("PlanID"),
new DataColumn("PlanName"),
new DataColumn("PlanCountry")});
dt.Rows.Add("01", "ABC", "India");
dt.Rows.Add("", "CDE", "UK");
dt.Rows.Add("", "FGH", "Russia");
dt.Rows.Add("04", "KLM", "France");
rptData.DataSource = dt;
rptData.DataBind();
}
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If Not Me.IsPostBack Then
Dim dt As DataTable = New DataTable()
dt.Columns.AddRange(New DataColumn() {
New DataColumn("PlanID"),
New DataColumn("PlanName"),
New DataColumn("PlanCountry")})
dt.Rows.Add("01", "ABC", "India")
dt.Rows.Add("", "CDE", "UK")
dt.Rows.Add("", "FGH", "Russia")
dt.Rows.Add("04", "KLM", "France")
rptData.DataSource = dt
rptData.DataBind()
End If
End Sub
Screenshot