<%--code provided by getcodesnippet.com--%>
| User ID | User Name | Contact Number |
|---|
<%# Eval("User_Id")%>
<%# Eval("User_Name")%>
<%# Eval("Contact_Number")%>
<%# Eval("Email")%>
TypeScript
-------code----
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// code provided by getcodesnippet.com
SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=CPD_TEST;User ID=sa;Password=sunil");
SqlCommand cmd = new SqlCommand("Select * From Table1", conn);
conn.Open();
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
conn.Close();
ListView1.DataSource = dt;
ListView1.DataBind();
}
}
-------------------------------This Control Not Show in Any Browser.
Please Solve Problem.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Karthik Raj11 pointsPosted Jan 11, 2015, 9:46 PM EST