Answers for "Using Session in ASP.NET MVC"

C#
0

Using Session in ASP.NET MVC

private void btnSubmit_Click(object sender, System.EventArgs e)
{ if(IsValid)
  { // Set the Session value.
    Session[txtName.Text] = txtValue.Text;
    // Read and display the value we just set
    lblResult.Text = "The value of <b>" +
	 txtName.Text + "</b> in the Session object is <b>" +
	 Session[txtName.Text].ToString() + "</b>"; } }
Posted by: Guest on May-04-2021

Code answers related to "Using Session in ASP.NET MVC"

C# Answers by Framework

Browse Popular Code Answers by Language