aspx page:
<asp:ListView ID="ListView1" ItemPlaceholderID="lv" runat="server">
<EmptyItemTemplate>
No RECORDS FOUND!!!!!!
</EmptyItemTemplate>
<LayoutTemplate>
<table align="center" bgcolor="#006291">
<th align="center">
<h2>
My Profile</h2>
</th>
<asp:PlaceHolder runat="server" ID="lv"></asp:PlaceHolder>
</table>
</LayoutTemplate>
<ItemTemplate>
<tr>
<td rowspan="3">
<asp:Image ID="img_profpic" Height="30px" Width="30px" ImageUrl='<%# Eval("Imageurl") %>'
runat="server" />
</td>
<td>
<asp:Label ID="Label4" runat="server" Text="Name:"></asp:Label>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label5" runat="server" Text="Designation:"></asp:Label>
<asp:Label ID="Label2" runat="server" Text='<%# Eval("Designation") %>'></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label6" runat="server" Text="EmailId:"></asp:Label>
<asp:Label ID="Label3" runat="server" Text='<%# Eval("EmalId") %>'></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label8" runat="server" Text="Year OF Experience:"></asp:Label>
</td>
<td>
<asp:Label ID="Label9" runat="server" Text='<%#Eval("Yearofexp") %>'></asp:Label>
</td>
</tr>
<tr>
<td colspan="2">
<asp:Label ID="Label7" runat="server" Text="Resume:"></asp:Label>
<asp:TextBox ID="TextBox1" TextMode="MultiLine" Height="400px" Width="400px" Text='<%#Eval("Resumes") %>'
runat="server"></asp:TextBox>
</td>
</tr>
</ItemTemplate>
</asp:ListView>
aspx.cs page
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostback)
{
loadlistview();
}
}
public void loadlistview()
{
using (DataClasses1DataContext dc1 = new DataClasses1DataContext())
{
var list = (from a in dc1.MZ_Employees select a).Tolist();
ListView1.DataSource = list;
ListView1.DataBind();
}
}