Building ASP.NET Applications

Slides:



Advertisements
Similar presentations
Developing a Web Site: Links Using a link is a quicker way to access information at the bottom of a Web page than scrolling down A user can select a link.
Advertisements

CIS 451: ASP Sessions and Applications Dr. Ralph D. Westfall January, 2009.
Intermediate Level Course. Text Format The text styles, bold, italics, underlining, superscript and subscript, can be easily added to selected text. Text.
Tutorial 6 Working with Web Forms
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 3-1 of…
Building ASP.NET Applications 2 Lecture 3,4 T. Ahlam Algharasi 4 th Level.
XP Tutorial 9 New Perspectives on JavaScript, Comprehensive1 Working with Cookies Managing Data in a Web Site Using JavaScript Cookies.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Creating Web Page Forms
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
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.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
XP Tutorial 6New Perspectives on HTML and XHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
1 Forms A form is the usual way that information is gotten from a browser to a server –HTML has tags to create a collection of objects that implement this.
© 2011 Delmar, Cengage Learning Chapter 9 Collecting Data with Forms.
IT533 Lectures Session Management in ASP.NET. Session Tracking 2 Personalization Personalization makes it possible for e-businesses to communicate effectively.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
Advanced Web Forms with Databases Programming Right from the Start with Visual Basic.NET 1/e 13.
State Management. What is State management Why State management ViewState QueryString Cookies.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
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.
© 2010 Delmar, Cengage Learning Chapter 8 Collecting Data with Forms.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Chapter 8 Collecting Data with Forms. Chapter 8 Lessons Introduction 1.Plan and create a form 2.Edit and format a form 3.Work with form objects 4.Test.
Christopher M. Pascucci Basic Structural Concepts of.NET Managing State & Scope.
Session and Cookie Management in.Net Sandeep Kiran Shiva UIN:
STATE MANAGEMENT.  Web Applications are based on stateless HTTP protocol which does not retain any information about user requests  The concept of state.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
1 Building FORMS In When a visitor enters information into a web form displayed in a web browser and clicks the submit button, the information is sent.
Chapter 4: Working with ASP.NET Server Controls OUTLINE  What ASP.NET Server Controls are  How the ASP.NET run time processes the server controls on.
Chapter 1 Getting Started With Dreamweaver. Exploring the Dreamweaver Workspace The Dreamweaver workspace is where you can find all the tools to create.
CIS 451: Cookies Dr. Ralph D. Westfall February, 2009.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
©SoftMooreSlide 1 Introduction to HTML: Forms ©SoftMooreSlide 2 Forms Forms provide a simple mechanism for collecting user data and submitting it to.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
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.
Web Site Development - Process of planning and creating a website.
ITM © Port,Kazman 1 ITM 352 Cookies. ITM © Port,Kazman 2 Problem… r How do you identify a particular user when they visit your site (or any.
Unit-6 Handling Sessions and Cookies. Concept of Session Session values are store in server side not in user’s machine. A session is available as long.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
1 Chapter 22 World Wide Web (HTTP) Chapter 22 World Wide Web (HTTP) Mi-Jung Choi Dept. of Computer Science and Engineering
HTML Structure II (Form) WEEK 2.2. Contents Table Form.
ASP.NET State Management Overview Prepared By Manish Kumar Aery(IM66) Department of computer Application IET Bhaddal (Ropar)
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
Teaching slides Chapter 6. Chapter 6 Software user interface design & construction Contents Introduction Graphical user interface – Rich window based.
2440: 141 Web Site Administration Web Forms Instructor: Joseph Nattey.
Getting an account with WordPress.com
4.01 How Web Pages Work.
Managing State Chapter 13.
Running a Forms Developer Application
In this session, you will learn to:
Working in the Forms Developer Environment
WWW and HTTP King Fahd University of Petroleum & Minerals
ASP.NET Web Controls.
Maintaining State in PHP Part II - Sessions
Microsoft Windows 2000 Professional
The Request & Response object
State management & Master Pages in asp.net
Maintaining State in PHP Part II - Sessions
Module 05: Building ASP .NET Applications
Chapter 16 The World Wide Web.
Web Development Using ASP .NET
HTML5 and Local Storage.
Cookies A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer.
PHP-II.
Drupal user guide Evashni Jansen Web Office.
Presentation transcript:

Building ASP.NET Applications Module 05: Building ASP .NET Applications Building ASP.NET Applications Lecture 5 T. Ahlam Algharasi 4th Level Copyright Microsoft 2001 July 15, 2001

Navigation Controls ASP.NET 2.0 has three new navigation controls: Dynamic menus TreeViews Site Map Path

Navigation Controls Menu Control The Menu control contains two types of items. StaticMenu that is always displayed on the page. DynamicMenu that appears when opens the parent item.

Navigation Controls Menu Control Properties of Menu Control Description Properties to change the Menu orientation from horizontal to vertical. Orientation To add menu item item Indicates the text to display in the menu. Text Indicates the tooltip of the menu item when you mouse over. ToolTip Indicates the target location to send the user when menu item is clicked NavigateUrl indicates where to open the target location (in new window or same window). Target

Navigation controls Menu Control Properties of Menu Control Description Properties Indicates the image that appears next to the menu item. ImageUrl Indicates the tooltip text to display for image next to the item. ImageToolTip Indicates the image that is displayed right to the menu item when it has some sub items. PopOutImageUrl

Navigation controls Menu Control Styles of Menu Control Description Properties Sets the style of the parent box in which all menu items appears. StaticMenuStyle Sets the style of the selected static items. StaticSelectedStyle Sets the mouse hovering style of the static items. StaticHoverStyle To customize the appearance of dynamic menu. DynamicMenuStyle To customize the appearance of dynamic menu item selected by the user. DynamicSelectedStyle to set the styles for dynamic menu items to change their appearance when mouse moves over them. DynamicHoverStyle

Navigation controls TreeView Control it is used to display the hierarchical data in tree view format. Properties of TreeView Control Description Properties Indicates the text to display in the node. Text Indicates the tooltip of the node when you mouse over. Tooltip Indicates the target location to send to the user when node is clicked. NavigateUrl Indicates the image that appears next to the node. ImageUrl

Navigation controls Styles of TreeView Control Description Properties Space (in pixel) between current node and the node above or below it. NodeSpacing Space (in pixel) between the top and bottom of the node text. VerticalPadding Space (in pixel) between the left and right of the node text. HorizontalPadding Space (in pixel) between the parent node and its child node. ChildNodePadding

State Management Web is Stateless, which means When navigating from one page to the next, all information of the previous page is lost. If user inserts some information, and move to the next page, that data will be lost and user would not able to retrieve the information. State management is the process by which you maintain state and page information over multiple requests for the same or different pages.

State Management Types of State Management: Hidden Fields Query strings Session state Cookies Hidden Fields You can store page-specific information in a hidden field on your page without displaying it in the user's browser as a way of maintaining the state of your page. This type called (Client – Side State Management)

State Management Advantages of using hidden fields are: No server resources are required .  The hidden field is stored and read from the page. Widespread support .  Almost all browsers and client devices support forms with hidden fields. Simple implementation  . Hidden fields are standard HTML controls that require no complex programming logic. Disadvantages of using hidden fields are: Potential security risks   Simple storage architecture .The hidden field does not support rich data types. Hidden fields offer a single string value field in which to place information. Storage limitations   

State Management Query Strings A query string is information that is appended to the end of a page URL. A typical query string might look like the following example: This type called (Client – Side State Management). Advantages of using query strings are: No server resources are required . Widespread support  Simple implementation 

State Management Disadvantages of using query strings are: Potential security risks.   The information in the query string is directly visible to the user via the browser's user interface. Limited capacity   Some browsers and client devices impose a 2083-character limit on the length of URLs.

Session state Session state is used to store and retrieve information as user navigates from one page to another page in ASP. It is often used to maintain things such as the user’s name, the user’s ID, a shopping cart, or various other elements that are discarded when a given user is no longer accessing pages on the website. Every time you make a new request, ASP.NET generates a new session ID until you actually use session state to store some information.

Session state Advantages Disadvantages It helps to maintain user states and data to all over the application. It can easily be implemented and we can store any kind of object.  Stores every client data separately.  Session is secure and transparent from user. Disadvantages    Performance overhead in case of large volume of user, because of session data stored in server memory. With the use of Session state, it will affect the performance of memory, because session state variable stays in server memory until you destroy the state.

Session state Session state can be lost in several ways: If the user closes and restarts the browser. If the user accesses the same page through a different browser window. If the session times out because of inactivity. By default, a session times out after 20 idle minutes. If the programmer ends the session by calling Session.Abandon().

Session state Properties of session Methods of session Description The unique ID of the session SessionID The number of items in the session state collection Count Description Methods Removes all items from the session state collection Clear Removes the specified item from the collection Remove(name)

Session(" variable_name ") = value Session("variable_name") Session state Store and Retrieve Session Variables Storing information in session variables Retrieving values from session variables Session(" variable_name ") = value Ex: Session("username")=“Ahmed“ Session(" username ") = Request.Form("TextBox1") Session("variable_name") Ex: Label1.text=Session("username”)

Session.Remove("fname") Session state Store and Retrieve Session Variables Remove Session Remove all session Session.Remove("fname") Session.RemoveAll()

Session state Example 1 Make a link in a web page and it doesn’t allow the user to move to the next page before registering

Session state log in Button Check the username and password if they are right store the username in a session

Session state Product Catalog link Button

Session state Example 2 Write a code for logging out

Session state Log out Button

Questions