Hi All ,
I want sample code for employee appl using session ,veiws and querystrings ...any sample application using these three session management techinques in ASP.NET and C#
thanks in advance
Regards,
Siri
Want Code on Session views and query strings
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Dipankar BiswasRank #992 · 2K reputationPosted Aug 2, 2014, 10:06 AM EDT
protected void Button1_Click(object sender, EventArgs e)
{
Session["username"] = txt_user_name.Text;
Session["email"] = txt_user_email.Text;
Session["password"] = txt_user_pass.Text;
Response.Redirect("edit_profile.aspx");
}
edit_profile.aspx code
public partial class Profile_page_Profile_home : System.Web.UI.Page
{
public static string strConnectionString = ConfigurationManager.ConnectionStrings["profileconnectionstrin"].ConnectionString;
public static SqlConnection con = new SqlConnection(strConnectionString);
public static SqlCommand cmd;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Label1.Text = Convert.ToString(Session["email"]);
Label2.Text= convert.ToString(Session["username"]);
}
}
Thanks
Dipankar Biswas
siri38 reputationPosted Aug 2, 2014, 10:47 AM EDT