Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     var storage = new ViewStorage();
     var users = (IEnumerable<User>)storage.Get(ViewStorageKeys.Users);
     Gridview1.DataSource = users;
     Gridview1.DataBind();
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     //Create an instance of the ViewStorage
     //Get the package from it and apply the properties to view fields
     var storage = new ViewStorage();
     var package = (Package)storage.Get(ViewStorageKeys.Package);
     LabelPackageName.Text = package.packagename;
     LabelDiscription.Text = package.description;
     LabelAdultPrice.Text = package.adultprice.ToString();
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     var storage = new ViewStorage();
     var package = storage.Get(ViewStorageKeys.Packages) as Package;
     if (package != null)
     {
         LabelName.Text = package.packagename;
         LabelDescription.Text = package.description;
         LabelPrice.Text = package.adultprice.ToString();
     }
 }