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
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
siriPosted Aug 2, 2014, 2:47 PM
Dipankar BiswasPosted Aug 2, 2014, 2:06 PM
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