Advertisement
wingman007

C#_ASP.NET_WebForms_Session_Default.aspx.cs

Nov 24th, 2014
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.69 KB | None | 0 0
  1. /*
  2. Create a new ASP.NET WebForms app. Open the code behind (F7) "Default.aspx.cs" and add the following code in the method Page_Load
  3. */
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Web;
  8. using System.Web.UI;
  9. using System.Web.UI.WebControls;
  10.  
  11. namespace WebApplication10
  12. {
  13.     public partial class _Default : Page
  14.     {
  15.         protected void Page_Load(object sender, EventArgs e)
  16.         {
  17.             string firstName = "Jeff";
  18.             string lastName = "Smith";
  19.             string city = "Seattle";
  20.             Session["FirstName"] = firstName;
  21.             Session["LastName"] = lastName;
  22.             Session["City"] = city;
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement