Assignment
06: Managing State Data
The Details:
This weeks assignment was about managing state data. Our go was simple to demo the following:
Create (3) ASP.NET pages that show different
method of managing state.
In class this week during lecture we review (5) which included:
1. Cookies
2. Sessions variables
3. Hidden Inputs
4. View States
5. Send a raw string back and forth
Resources to review:
Just like every week we were given several resources to review. I spent considerable time going through all of these
1) ASP
Tutorial
We also had an additional video we were assigned. This video did a 8 minute overall of JSON
Demo of Managing State Data
To start the demo I created a master page, and three content pages to demonstrate my knowledge of managing state data. Below is my Solution Explorer for Assignment 6
Besides the pages, I also added a App_Code Folder to keep my customer class in.
Then added a css folder to improve graphics and JQuery viewed in the screenshot below
Demo 1: Creating Cookies - ~/ContactUs
In this demo I used the ContactUs Content page to demo my knowledge of this subject. Here is what the C# looked like
Next I wrote some code for the ContactUS html buttons
When the program ran this is what it looked like
Demo 2: View State - ~/About
In this demo, I will demonstrate my knowledge of view state. The class I built was Customer and the strings I choice to use was FirstName and LastName. Then I constructed a static string, and created a new object Customer Name Tim Pauley.
Then I used a button with the response
Screenshot of code Part 1
Screenshot of code Part 2Below are the html buttons which relates back to my C# code. An extra I did was to add the class="c-button"
Here is the .c-button css folder styles class
Below is the program running
Demo 3: Using Hidden Inputs - ~/home
This demo is still a work in progress. I started by attempting to demo Reading a Secession Variable with a separate class named Customer. However, after spending time on this, I realized a better demo would be to demo hidden inputs. Below is some of the work I did on this demo
Original Demo 3
This is the C# I was using
This is the class the html I used