Overview of Previous Lesson(s) Over View  Server controls are small building blocks of the graphical user interface, which includes  Text boxes  Buttons.

Slides:



Advertisements
Similar presentations
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Advertisements

Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 1.1 of…
Tutorial 6 Working with Web Forms
Introduction to ASP.NET, Second Edition2 Chapter Objectives.
Introduction to ASP.NET
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
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 The World Wide Web. 2  Web Fundamentals  Pages are defined by the Hypertext Markup Language (HTML) and contain text, graphics, audio, video and software.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Course Textbook: Build Your Own ASP.Net Website: Chapter 2
Web Forms. Agenda Web forms Web controls Code separation Dynamic compilation System.Web.UI.Page User controls.
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.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Database-Driven Web Sites, Second Edition1 Chapter 8 Processing ASP.NET Web Forms and Working With Server Controls.
Module 7: Validating User Input.
Chapter 3 Using Validation Controls. What is a Validation Control? A control that validates the value in another control Renders as an HTML tag with an.
1 Presented by Bikash Shrestha. 2 What is ASP.NET or ASP+? ASP.NET/ASP+ is a programming framework built on the common language runtime that can be used.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Joe Hummel, PhD Dept of Mathematics and Computer Science Lake Forest College
An Introduction to ASP.NET Ed Dunhill blogs.msdn.com/edunhill SLIDE7.
Telerik Software Academy ASP.NET Web Forms Data Validation, Data Validators, Validation Groups Telerik Software Academy
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.
Creating Web Applications Using ASP.NET Chapter Microsoft Visual Basic.NET: Reloaded 1.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
© Minder Chen, ASP.NET 2.0: Introduction - 1 ASP.NET 2.0 Minder Chen, Ph.D. Framework Base Class Library ADO.NET: Data & XML.
Chapter 8 Cookies And Security JavaScript, Third Edition.
Christopher M. Pascucci Basic Structural Concepts of.NET Managing State & Scope.
Overview of Previous Lesson(s) Over View  SDI programs  The Application Wizard can generate single-document interface (SDI) applications that work.
Introducing ASP.NET 2.0. Internet Technologies WWW Architecture Web Server Client Server Request Response Network HTTP TCP/IP PC/Mac/Unix + Browser (IE,
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.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Module 4: Creating a Microsoft ASP.NET Web Form. Overview Creating Web Forms Using Server Controls.
AUC Technologies Projects Consulting, Development, Mentoring, and Training Company ASP.NET Validation Control Presented By : Muhammad Atif Hussain Deputy.
VALIDATION CONTROLS.  Validation Controls are primarily used to validate, or verify the data entered by user into a web form.  Validation controls attempt.
PAGE DIRECTIVES. Page Directives  They are instructions, inserted at the top of an ASP.NET page, to control the behavior of ASP.NET pages.  So it is.
ASP.Net, Web Forms and Web Controls 1 Outline Session Tracking Cookies Session Tracking with HttpSessionState.
The Problem of State. We will look at… Sometimes web development is just plain weird! Internet / World Wide Web Aspects of their operation The role of.
ASP.NET 4 Unleashed Chapter 1. .aspx page: contains C# script and HTML code including tags. Listing 1.1 FirstPage.aspx.
Session 6: Validating User Input. Outline Overview of User Input Validation Client-Side and Server-Side Validation ASP.NET Validation Controls Using Validation.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
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.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Vijayalakshmi G M Validation Controls.
Asp.NET Core Server Controls. Slide 2 Lecture Overview Understanding the types of ASP.NET controls HTML controls ASP.NET (Web) controls.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Overview of Previous Lesson(s) Over View  ASP is a technology that enables scripts in web pages to be executed by an Internet server.  ASP.NET is a.
Text INTRODUCTION TO ASP.NET. InterComm Campaign Guidelines CONFIDENTIAL Simply Server side language Simplified page development model Modular, well-factored,
ASP.NET Part II Dr. Awad Khalil Computer Science Department AUC.
Beginning ASP.NET in C# and VB Chapter 9
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
Introduction to ASP.NET, Second Edition2 Chapter Objectives.
1 Introducing Web Developer Tools Rapid application development tools ASP.NET-compatible web editors –Visual Studio.NET Professional Edition –Visual Studio.
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
Validation Controls Assist your users with providing the correct type of input for your application Assist your users with providing the correct type of.
Chapter 1 Getting Started with ASP.NET Objectives Why ASP? To get familiar with our IDE (Integrated Development Environment ), Visual Studio. Understand.
Validation & Rich Controls
Computing with C# and the .NET Framework
Web Application Web Application are programs that can be executed either on a Web server or in a Web browser. An Online store accessed through a browser.
Chapter 8 User Controls.
Asp.net.
ASP.NET Imran Rashid CTO at ManiWeber Technologies.
Validation & Rich Controls
Presentation transcript:

Overview of Previous Lesson(s)

Over View  Server controls are small building blocks of the graphical user interface, which includes  Text boxes  Buttons  Labels and numerous other tools.  These controls are also used for some structural jobs like  Validation  Data Access  Security 3

Over View..  HTML server controls are basically the original HTML controls but enhanced to enable server side processing.  The HTML controls like the header tags, anchor tags and input elements are not processed by the server but sent to the browser for display.  Attribute runat="server“ & adding an id attribute. 4

Over View…  Client Side Scripts  Run on the browser and in turn would speed up the execution of page.  Client Side Source Code  ASP.NET pages generate. 5

Over View…  HyperLink Control  The HyperLink control is like the HTML element. HyperLink  Image Control  The image control is used for displaying images on the web page, or some alternative text, if the image is not available. 6

Contents  ASP.NET - Directives  ASP.NET - State Management  View State  Session State  Application State  ASP.NET - Validation Controls 8

Directives  ASP.Net directives are instructions to specify optional settings. Ex.  Registering a custom control  Specify page language.  These settings describe how the web forms (.aspx) or user controls (.ascx) pages are processed by the.Net framework. 9

Directives..  The Application Directive  Defines application-specific attributes.  It is provided at the top of the global.aspx file. 10

Directives…  The Assembly Directive  The Assembly directive links an assembly to the page or the application at parse time.  This could appear either in the global.asax file for application- wide linking or in the page file or a user control file for linking to a page or user control. 11

Directives…  The Control Directive  The Control directive is used with the user controls and appears in the user control (.ascx) files. 12

Directives…  The Implements Directive  The Implement directive indicates that the web page, master page or user control page must implement the specified.Net framework interface. 13

Directives…  The Import Directive  The Import directive imports a namespace into a web page, user control page of application.  If the Import directive is specified in the global.asax, then it will apply to the entire application.  If it is in a page of user control page, then it would apply to that page or control. 14

Directives…  The Master Directive  The Master directive specifies a page file as being the master page. 15

Directives…  The MasterType Directive  The MasterType directive assigns a class name to the Master property of a page, to make it strongly typed. 16

Directives…  The OutputCache Directive  The OutputCache directive controls the output caching policies of a web page or a user control.  The Page Directive  The Page directive defines the attributes specific to the page file for the page parser and the compiler. 17

Directives…  The PreviousPageType Directive  The PreviousPageType directive assigns a class to a page, so that the page is strongly typed. 18

Directives…  The Reference Directive  The Reference directive indicates that another page or user control should be compiled and linked to the current page.  The Register Directive  The Register derivative is used for registering the custom server controls and user controls. 19

State Management  HTTP ( Hyper Text Transfer Protocol) is a stateless protocol.  When the client disconnects from the server, the ASP.Net engine discards the page objects.  This way each web application can scale up to serve numerous requests simultaneously without running out of server memory. 20

State Management..  The current value of all the controls and variables for the current user in the current session is called the State.  ASP.Net manages four types of state:  View State  Control State  Session State  Application State 21

View State  The View State is the state of the page and all its controls.  It is automatically maintained across posts by the ASP.Net framework.  When a page is sent back to the client, the changes in the properties of the page and its controls are determined and stored in the value of a hidden input field named _VIEWSTATE.  When the page is again post back the _VIEWSTATE field is sent to the server with the HTTP request. 22

View State..  The view state could be enabled or disabled for  The entire application  By setting the EnableViewState property in the section of web.config file  A page  By setting the EnableViewState attribute of the Page directive, as  A control  By setting the Control.EnableViewState property. 23

View State...  It is implemented using a view state object defined by the StateBag class.  StateBag class  Defines a collection of view state items.  A data structure containing attribute/value pairs, stored as strings associated with objects. 24

View State...  The StateBag class has the following properties 25

View State... 26

View State...  Example  Let us keep a counter, which is incremented each time the page is post back by clicking a button on the page.  A label control shows the value in the counter.  Lets do it.. 27

Session State  When a user connects to an ASP.Net website, a new session object is created.  When session state is turned on, a new session state object is created for each new request.  This session state object becomes part of the context and it is available through the page.  Sessions are used to keep information about the user and his preference and keep track of pending operations. 28

Session State..  Sessions are used to keep information about  The User  User preferences &  Keep track of pending operations  Sessions are identified and tracked with a 120-bit SessionID.  Passed from client to server and back as cookie or a modified URL. 29

Session State…  The SessionID is globally unique and random.  The session state object is created from the HttpSessionState class.  It defines a collection of session state items. 30

Session State…  The HttpSessionState class has the following methods  Lets see a session example. 31

Application State  An ASP.Net application is the collection of all web pages, code and other files within a single virtual directory on a web server.  Information stored in application state, it is available to all the users.  To provide for the use of application state, ASP.Net creates an application state object for each application from the HTTPApplicationState class and stores this object in server memory. 32

Application State..  Application State is mostly used to store hit counters and other statistical data, global application data like tax rate, discount rate etc and to keep track of users visiting the site. 33

Application State..  Application state data is generally maintained by writing handlers for the events  Application_Start  Application_End  Application_Error  Session_Start  Session_End 34

Application State..  The following code shows the basic syntax for storing application state information Void Application_Start(object sender, EventArgs e) { Application["startMessage"] = "The application has started."; } Void Application_End(object sender, EventArgs e) { Application["endtMessage"] = "The application has ended."; } 35

Validations Controls  ASP.Net validation controls validate the user input data to ensure that useless, unauthenticated or contradictory data don’t get stored.  Validation controls  RequiredFieldValidator  RangeValidator  CompareValidator  RegularExpressionValidator  CustomValidator  ValidationSummary 36

The BaseValidator Class  The validation control classes inherit from the BaseValidator class and inherit its properties and methods. 37

Validations Controls  RequiredFieldValidator  The RequiredFieldValidator control ensures that the required field is not empty.  It is generally tied to a text box to force input into the text box. <asp:RequiredFieldValidator ID="rfvcandidate" runat="server" ControlToValidate ="ddlcandidate" ErrorMessage="Please choose a candidate" InitialValue="Please choose a candidate” 38

Validations Controls..  The RangeValidator  The RangeValidator control verifies that the input value falls within a predetermined range. 39

Validations Controls..  The CompareValidator  The CompareValidator control compares a value in one control with a fixed value, or, a value in another control. 40

Validations Controls...  The CustomValidator  The CustomValidator control allows writing application specific custom validation routines for both the client side and the server side validation.  The client side validation is accomplished through the ClientValidationFunction property.  The client side validation routine should be written in a scripting language, like JavaScript or VBScript, which the browser can understand. 41

Validations Controls...  The CustomValidator  The server side validation routine must be called from the control ServerValidate event handler.  The server side validation routine should be written in any.Net language, like C# 42

Validations Controls...  The ValidationSummary Control  The ValidationSummary control does not perform any validation but shows a summary of all errors in the page.  The summary displays the values of the ErrorMessage property of all validation controls that failed validation. 43

Validations Controls...  The following two mutually inclusive properties list out the error message:  ShowSummary shows the error messages in specified format.  ShowMessageBox shows the error messages in a separate window. <asp:ValidationSummary ID="ValidationSummary1" runat="server" DisplayMode = "BulletList" ShowSummary = "true" HeaderText="Errors:" /> 44

Validations Controls...  Validation Groups  Complex pages have different groups of information provided in different panels.  In such a situation a need for performing validation separately for separate group, might arise.  This kind of situation is handled using validation groups.  To create a validation group, put the input controls and the validation controls into the same logical group by setting their ValidationGroup property. 45

Validations Controls...  Lets see the ex of Validations … 46

COURSE END 47

What we have learned ??

 Object Oriented Programming  Visual C++  CLR Programming  Debugging Techniques  MFC based applications  SDI / MDI Applications  Windows Forms  Web Applications  MS Visual Studio 2008 / 2010  Object Oriented Programming  Visual C++  CLR Programming  Debugging Techniques  MFC based applications  SDI / MDI Applications  Windows Forms  Web Applications  MS Visual Studio 2008 /

Thank You 50