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 home : System.Web.UI.Page { SqlConnection con; SqlCommand cmd; SqlDataAdapter adp; DataSet ds; void connect() { con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\Abhik\Documents\Visual Studio 2010\WebSites\XP\App_Data\Database.mdf;Integrated Security=True;User Instance=True"); con.Open(); } protected void Page_Load(object sender, EventArgs e) { connect(); adp = new SqlDataAdapter("select * from user_info where u_mail='"+Session["id"].ToString()+"'", con); ds = new DataSet(); adp.Fill(ds); Label1.Text = ds.Tables[0].Rows[0][0].ToString(); Label2.Text = ds.Tables[0].Rows[0][1].ToString(); Label3.Text = ds.Tables[0].Rows[0][3].ToString(); Label4.Text = ds.Tables[0].Rows[0][5].ToString(); } protected void Button1_Click(object sender, EventArgs e) { Response.Redirect("signin.aspx"); } }
Line 26: adp = new SqlDataAdapter("select * from user_info where u_mail='"+Session["id"].ToString()+"'", con);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)