Skip to content

List View

Sunil Kumar Sudhansu

Sunil Kumar Sudhansu

Asked Jan 11, 2015, 4:56 AM EST1 answer
Share
LinkedInX

<%--code provided by getcodesnippet.com--%>














User ID User Name Contact Number Email





<%# 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 Raj
    0
    Working Fine. How is it displaying at your end..?
    0