Bind The Record List View

Jayakumars
Posted by Jayakumars under ASP.NET AJAX category on | Points: 40 | Views : 867
Bind The Record List View
===================================
<asp:ListView ID="lst1" runat ="server">
<ItemTemplate>
Name: <asp:Label ID="lblName" runat ="server" Text ='<%# Bind("username") %>'></asp:Label>
Password: <asp:Label ID="Label1" runat ="server" Text ='<%# Bind("password") %>'></asp:Label>
</ItemTemplate>
</asp:ListView>

protected void bt_Submit_Click(object sender, EventArgs e)
{
DataTable dt = new DataTable();
dt = dtBind("Select * from Table_1");
lst1.DataSource = dt;
lst1.DataBind();
}

Comments or Responses

Login to post response