Advertisement
wingman007

C#_ASP.NET_WebForms_Session_About.aspx.cs

Nov 24th, 2014
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | None | 0 0
  1. /*
  2. Create a new ASP.NET WebForms app. In the About page drag label control and name it lblMyText. Open the code behind F7 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 About : Page
  14.     {
  15.         protected void Page_Load(object sender, EventArgs e)
  16.         {
  17.             string firstName = (string)(Session["FirstName"]);
  18.             string lastName = (string)(Session["LastName"]);
  19.             string city = (string)(Session["City"]);
  20.             lblMyText.Text = firstName;
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement