this is mine code..
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
public partial class Default5 : System.Web.UI.Page
{
string strconn = ConfigurationManager.ConnectionStrings["touchconnectionstring7"].ConnectionString;
string conny;
SqlCommand cmd;
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(strconn);
con.Open();
string conny = "select userid, FIRSTNAME, PASSWORD, EMAILID FROM registration WHERE userid= max(userid);
cmd = new SqlCommand(conny, con);
SqlDataReader dr = cmd.ExecuteReader();
dr.Read();
Label1.Text = dr["FIRSTNAME"].ToString();
dr.Read();
Label2.Text = dr["PASSWORD"].ToString();
dr.Read();
Label3.Text = dr["EMAILID"].ToString();
dr.Read();
dr.Close();
con.Close();
}
}
this code is not working guys help me its urgent.