asp net web forms and web controls l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
ASP .Net, Web Forms and Web Controls PowerPoint Presentation
Download Presentation
ASP .Net, Web Forms and Web Controls

Loading in 2 Seconds...

play fullscreen
1 / 21

ASP .Net, Web Forms and Web Controls - PowerPoint PPT Presentation


  • 147 Views
  • Uploaded on

ASP .Net, Web Forms and Web Controls. Outline Session Tracking Cookies Session Tracking with HttpSessionState. Session Tracking . Personalization Tailored to client’s needs Creates customer loyalty Requires a Session ID – represents a unique client Tradeoff: Privacy protection

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'ASP .Net, Web Forms and Web Controls' - sevilen


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
asp net web forms and web controls
ASP .Net, Web Forms and Web Controls

Outline Session Tracking Cookies Session Tracking with HttpSessionState

session tracking
Session Tracking
  • Personalization
    • Tailored to client’s needs
    • Creates customer loyalty
    • Requires a Session ID – represents a unique client
  • Tradeoff: Privacy protection
    • Release of vital, possibly private, data
  • Tracking achieved by using
    • Cookies
    • ASP.NET’s HttpSessionState object
    • Hidden input form elements and URL tracking
cookies
Cookies
  • Cookies
    • Text file stored by a Web site on a individual’s computer that allows the site to track the actions of the visitor
      • Records sites that the user visits and identifies shopping preferences
      • Cookies can store name-value pairs
      • Web Server can never access cookies created outside the domain associated with that server
      • Cookie’s Expires property (default is browsing session)
optionspage aspx cs program output

OptionsPage.aspx.cs Program Output

Server creates a cookie that stores a record of the chosen language, as well as the ISBN number for a book.

When user clicks hyperlink, the cookies previously stored on the client are read and used to form a list of book recommendations

slide8

Three hyperlinks are made visible

Determines whether the user selected a language

slide9

Cookie is added to the cookie collection sent as part of HTTP response header

Returns value corresponding to key contained in language

New cookie object created to store language and ISBN number

slide10

Label displays text recommendations

Displays the recommendations created by the code-behind file

slide12

Method to retrieve cookies from the client

Ensure that there is at least one cookie

Add information in other cookies into list box

Execute if no language was selected

session tracking with httpsessionstate
Session Tracking with HttpSessionState
  • HttpSessionState
    • HttpSessionState objects can store any type of objects (not just Strings) as attribute values
  • Example modified:
    • The ASPX file is similar
session tracking with httpsessionstate16
Session Tracking with HttpSessionState
  • Every Web Form includes an HttpSessionState Object, accessible through property Session of class Page
  • Use this property Session to manipulate page’s HttpSessionState object.
slide20

Indexing the Session object with key name

Event handler PageInit retrieves session information

Iterates through the Session object