 ASP.NET provides an event based programming model that simplifies web programming  All GUI applications are incomplete without enabling actions  These.

Slides:



Advertisements
Similar presentations
17 HTML, Scripting, and Interactivity Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and.
Advertisements

The Web Warrior Guide to Web Design Technologies
Forms cs105. More Interactive web-pages So far what we have seen was to present the information. (Ex: tables. Lists,….). But it is not enough. We want.
Basics of ASP.NET. 2 © UW Business School, University of Washington 2004 Outline Installing ASP.NET and Web Matrix Data Types Branching Structure Procedures.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 3-1 of…
Chapter 10 Form Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
ASP.NET Programming with C# and SQL Server First Edition
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
CST JavaScript Validating Form Data with JavaScript.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
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.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Server-side Scripting Powering the webs favourite services.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Dynamic Action with Macromedia Dreamweaver MX Barry Sosinsky Valda Hilley.
Beginning Web Site Development Module 1 – Dynamic Web Site Development Fundamentals of building dynamic Web sites with ASP.NET 2.0 and C# Version.
Christopher M. Pascucci.NET Programming: Forms & Controls.
Event Handlers CS101 Introduction to Computing. Learning Goals Learn about event handlers Determine how events are useful in JavaScript Discover where.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 4-1 of…
INSPIRING CREATIVE AND INNOVATIVE MINDS Module 4: Adding Code to a Microsoft ASP.NET Web Form Implementing Code-Behind Pages Adding Event Procedures to.
1 Goals and Objectives Goals Goals Understand how JavaScript makes it possible to interact with web pages, minimizes client/server traffic, enables verification.
ASP.NET Web Server Controls Basic Web Server Controls.
© Minder Chen, ASP.NET 2.0: Introduction - 1 ASP.NET 2.0 Minder Chen, Ph.D. Framework Base Class Library ADO.NET: Data & XML.
ASP.NET Controls. Slide 2 Lecture Overview Identify the types of controls supported by ASP.NET and the differences between them.
JavaScript: Functions © by Pearson Education, Inc. All Rights Reserved.
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and check boxes using HTML Add a pull-down.
Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design.
Lecture # 6 Forms, Widgets and Event Handling. Today Questions: From notes/reading/life? Share Personal Web Page (if not too personal) 1.Introduce: How.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
INTRODUCTION TO HTML5 Using jQuery with HTML5. Introducing jQuery  Although it is not a part of any W3C or WHATWG specification, jQuery performs an important.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
Chapter 6 Sub Procedures
Week 9 - Form Basics Key Concepts 1. 1.Describe common uses of forms on web pages 2.Create forms on web pages using the form, input, textarea, and select.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Unit 3: Adding Code to a Microsoft ASP.NET Web Form.
Module 3: Using Microsoft.NET- Based Languages. Overview Overview of the.NET-Based Languages Comparison of the.NET-Based Languages.
HTML Form Widgets. Review: HTML Forms HTML forms are used to create web pages that accept user input Forms allow the user to communicate information back.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.
Chapter 2: Variables, Functions, Objects, and Events JavaScript - Introductory.
ASP.NET 4 Unleashed Chapter 1. .aspx page: contains C# script and HTML code including tags. Listing 1.1 FirstPage.aspx.
Christopher M. Pascucci.NET Programming: WebForm Events.
Module 4: Creating a Web Application with Web Forms
WDMD 170 – UW Stevens Point 1 WDMD 170 Internet Languages eLesson: Variables, Functions and Events (NON-Audio version) © Dr. David C. Gibbs WDMD.
ASP.NET User Controls. User Controls In addition to using Web server controls in your ASP.NET Web pages, you can create your own custom, reusable controls.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
Asp.NET Core Server Controls. Slide 2 Lecture Overview Understanding the types of ASP.NET controls HTML controls ASP.NET (Web) controls.
The basics of knowing the difference CLIENT VS. SERVER.
USING JAVASCRIPT TO SHOW AN ALERT Web Design Sec 6-2 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
Understanding JavaScript and Coding Essentials Lesson 8.
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.
PostBack  When an initial request for a page (a Web Form) is received by ASP.NET, it locates and loads the requested Web Form (and if necessary compiles.
JavaScript Events Java 4 Understanding Events Events add interactivity between the web page and the user You can think of an event as a trigger that.
JavaScript Events. Understanding Events Events add interactivity between the web page and the user Events add interactivity between the web page and the.
REEM ALMOTIRI Information Technology Department Majmaah University.
Using JavaScript to Show an Alert
Chapter 8: Writing Graphical User Interfaces
Section 17.1 Section 17.2 Add an audio file using HTML
JavaScript Functions.
Using Procedures and Exception Handling
C# Event Processing Model
CIS16 Application Development and Programming using Visual Basic.net
Web Development Using ASP .NET
Fundamentals of Programming in VB.Net
Events: Changed and Input
Button Web Server Controls
Presentation transcript:

 ASP.NET provides an event based programming model that simplifies web programming  All GUI applications are incomplete without enabling actions  These actions instructs the program to act when something happens  Events can also be generated without user interactions  Event handlers are methods in an object that are executed in response to some events occurring in the application HANDLING CLIENT-SIDE EVENTS ON THE SERVER  One of the important features of the ASP.NET web form model is its ability to support client-side events through server-side code  In order to support client-side events with server-side code, the control must have a runat=“server” attribute  This attribute tells ASP.NET to create dynamic code that links the server-side code to the control

WEB FORM EVENT HANDLING  ASP.NET applications utilize two important types of event handlers with different applications  These are the “page load” & “click” event handlers  The “page load” event handler is triggered every time the web page is requested and loaded by the server, while the “click” event handler is triggered every time a button is clicked EVENT ARGUMENTS  The event arguments specify the data associated with an event  When an event is raised the event arguments are passed to the event handlers  With this data they have sufficient information to handle the event  The first parameter represents the object raising the event.  The second parameter return the event arguments

EVENT HANDLER  An Event handler is a method that performs custom actions in response to an event notification provided by the event of a class  This handler must take as parameters exactly the values that the event generates  By convention an event handler returns no data and takes two parameters  The first specifies the object on which the event occurred(the publisher of the event)  The second contains the event arguments as describe  The process of client-side event handling with server code involves two task: Defining control events & adding server side code that responds to the event  Once you define an event associated with a control, this will register the control to emit a block client-side code  You can also register a server-side event for the standard HTML by using OnServerClick

 Once Control event has been defined you need to add a matching code block that will be executed when the client-side event is fired  All server-side events, or event handlers, have similar signature or parameter list. The parameter list consist of 2 arguments Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click End Sub

EventAttributeControls ClickOnClick Button, image button, link button, image map CommandOnCommandButton, image button, link button TextChangedOnTextChangedText box SelectedIndexCha nged OnSelectedIndexCha nged Drop-down list, list box, radio button list, check box list. CheckedChangedOnCheckedChangedCheck box, radio button CONTROL EVENTS