ASP.Net, Web Forms and Web Controls 1 Outline Session Tracking Cookies Session Tracking with HttpSessionState.

Slides:



Advertisements
Similar presentations
JavaScript Forms Form Validation Cookies. What JavaScript can do  Control document appearance and content  Control the browser  Interact with user.
Advertisements

Web App Development with ASP.NET. Introduction In this chapter, we introduce web-app development with Microsoft’s ASP.NET technology. Web-based apps create.
1 Chapter 12 Working With Access 2000 on the Internet.
XP Browser and Basics1. XP Browser and Basics2 Learn about Web browser software and Web pages The Web is a collection of files that reside.
JavaScript Forms Form Validation Cookies CGI Programs.
XP Tutorial 9 New Perspectives on JavaScript, Comprehensive1 Working with Cookies Managing Data in a Web Site Using JavaScript Cookies.
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
Session Management A290/A590, Fall /25/2014.
1 The World Wide Web. 2  Web Fundamentals  Pages are defined by the Hypertext Markup Language (HTML) and contain text, graphics, audio, video and software.
Browser and Basics Tutorial 1. Learn about Web browser software and Web pages The Web is a collection of files that reside on computers, called.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
ASP.NET Programming with C# and SQL Server First Edition
CST JavaScript Validating Form Data with JavaScript.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Beginning Active Server Pages Barry Sosinsky Valda Hilley Programming.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
Database-Driven Web Sites, Second Edition1 Chapter 8 Processing ASP.NET Web Forms and Working With Server Controls.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Joe Hummel, PhD Dept of Mathematics and Computer Science Lake Forest College
Overview of Previous Lesson(s) Over View  Server controls are small building blocks of the graphical user interface, which includes  Text boxes  Buttons.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
IT533 Lectures Session Management in ASP.NET. Session Tracking 2 Personalization Personalization makes it possible for e-businesses to communicate effectively.
Session Tracking Dr. Awad Khalil Computer Science & Engineering Department AUC.
JavaScript, Fourth Edition
Working with Cookies Managing Data in a Web Site Using JavaScript Cookies* *Check and comply with the current legislation regarding handling cookies.
Creating Web Applications Using ASP.NET Chapter Microsoft Visual Basic.NET: Reloaded 1.
ASP.Net, Web Forms and Web Controls 1 Outline Web Controls Text and Graphics Controls AdRotator Control Validation Controls.
CSCI 6962: Server-side Design and Programming Introduction to Active Server Pages.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
Chapter 8 Cookies And Security JavaScript, Third Edition.
PHP1-1 PHP Lecture 2 Xingquan (Hill) Zhu
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
Chapter 6 Server-side Programming: Java Servlets
Cookies Web Browser and Server use HTTP protocol to communicate and HTTP is a stateless protocol. But for a commercial website it is required to maintain.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
11 1 Cookies CGI/Perl Programming By Diane Zak Objectives In this chapter, you will: Learn the difference between temporary and persistent cookies.
Christopher M. Pascucci Basic Structural Concepts of.NET Managing State & Scope.
7 Chapter Seven Client-side Scripts. 7 Chapter Objectives Create HTML forms Learn about client-side scripting languages Create a client-side script using.
Module 4: Creating a Microsoft ASP.NET Web Form. Overview Creating Web Forms Using Server Controls.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Bookstore Application: Middle Tier Introducing Code-Behind Files, Session State.
ASP. What is ASP? ASP stands for Active Server Pages ASP is a Microsoft Technology ASP is a program that runs inside IIS IIS stands for Internet Information.
Select (drop-down list) Inputs. Insert/Form/List Menu.
CIS 451: Cookies Dr. Ralph D. Westfall February, 2009.
Understanding Web Applications Lesson 4. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding Web Page Development Understand Web.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
1 State and Session Management HTTP is a stateless protocol – it has no memory of prior connections and cannot distinguish one request from another. The.
Active Server Pages Session - 3. Response Request ApplicationObjectContext Server Session Error ASP Objects.
Project 5: Customizing User Content Essentials for Design JavaScript Level Two Michael Brooks.
ASP.NET Part II Dr. Awad Khalil Computer Science Department AUC.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
Sergey Sidorov PhD student, computer software chair Computer Science department.
COOKIES Gloria Soria Network Security COSC 356. What is a Cookie? A cookie is a piece of text that a Web Server can store on a user's hard disk. Cookies.
PHP: Further Skills 02 By Trevor Adams. Topics covered Persistence What is it? Why do we need it? Basic Persistence Hidden form fields Query strings Cookies.
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
Chapter 5 Validating Form Data with JavaScript
Computing with C# and the .NET Framework
ASP.NET Forms.
In this session, you will learn to:
Y.-H. Chen International College Ming-Chuan University Fall, 2004
Chapter 19 PHP Part III Credits: Parts of the slides are based on slides created by textbook authors, P.J. Deitel and H. M. Deitel by Prentice Hall ©
© 2016, Mike Murach & Associates, Inc.
Chapter 23 – ASP.NET Outline 23.1 Introduction NET Overview
Forms, cont’d.
HTML5 and Local Storage.
© 2016, Mike Murach & Associates, Inc.
5/6/2019 Session 8.2 Postback, ViewState
Presentation transcript:

ASP.Net, Web Forms and Web Controls 1 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 Release of vital, possibly private, data Tracking achieved by using Cookies ASP.NET’s HttpSessionState object Hidden input form elements and URL tracking 2

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) 3

OptionsPage.aspx.cs Program Output 4 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

5 Label Web control Defines five radio buttons

OptionsPage.aspx 6 Request current page, does not cause a postback

7 Define books as a Hashtable, stores key-value Add values to Hashtable

8 Determines whether the user selected a language Three hyperlinks are made visible

9 Returns value corresponding to key contained in language New cookie object created to store language and ISBN number Cookie is added to the cookie collection sent as part of HTTP response header

10 Displays the recommendations created by the code-behind file Label displays text recommendations

11

12 Ensure that there is at least one cookie Add information in other cookies into list box Execute if no language was selected Method to retrieve cookies from the client

Recommendations Page.aspx.cs Program Output 13

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 14

OptionsPage.aspx.cs Program Output 15

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. 16

Options.aspx 17

18

19

20 Event handler PageInit retrieves session information Indexing the Session object with key name Iterates through the Session object

Prog ram Outp ut 21