protected void Page_Load(object sender, EventArgs e) { Label1.Text = Session["name"].ToString(); detail(); } public void detail() { SqlConnection conn = new SqlConnection("Data Source=SNEHAL-PC\\SNEHAL1;Initial Catalog=TEMPRUJU;Integrated Security=True"); SqlCommand cmd; conn.Open(); //String st = "select name,midname,surname,contact,dob,email,address,ltype,image from login"; cmd = new SqlCommand("select Id,name,midname,surname,username,password,contact,dob,email,address,ltype,image from login where id='" + User.Identity.Name + "'", conn); DataSet ds = new DataSet(); DataTable dt = new DataTable(); SqlDataAdapter ad = new SqlDataAdapter(cmd); ad.Fill(ds); GridView2.DataSource = ds; GridView2.DataBind(); conn.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)