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.

Slides:



Advertisements
Similar presentations
Java Script Session1 INTRODUCTION.
Advertisements

Tutorial 6 Creating a Web Form
The Web Warrior Guide to Web Design Technologies
Anatomy of an ASP.NET Page. Slide 2 My Version of the Big Picture (1) ASP Worker (Engine) Your application Runs Server Other applications User 1User 2.
1 Chapter 12 Working With Access 2000 on the Internet.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
Basics of ASP.NET. 2 © UW Business School, University of Washington 2004 Outline Installing ASP.NET and Web Matrix Data Types Branching Structure Procedures.
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
1 Chapter 20 — Creating Web Projects Microsoft Visual Basic.NET, Introduction to Programming.
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.
Chapter 9 Web Applications Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
INTRODUCTION TO WEB DATABASE PROGRAMMING
9-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
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.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
CIS 375—Web App Dev II ASP.NET 2 Introducing Web Forms.
Database-Driven Web Sites, Second Edition1 Chapter 8 Processing ASP.NET Web Forms and Working With Server Controls.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
ASP.Net Web Applications. Characteristics of a typical data driven web application Web Server HTML Graphics Active-X Java Applets HTTP Request ADO / JDBC.
Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours Digital Media.
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.
ASP.NET Controls. Slide 2 Lecture Overview Identify the types of controls supported by ASP.NET and the differences between them.
Validation and Rich controls 1www.tech.findforinfo.com.
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.
ASP.NET.. ASP.NET Environment ASP.NET is Microsoft's programming framework that enables the development of Web applications and services. It is an easy.
McGraw-Hill © 2009 The McGraw-Hill Companies, Inc. All rights reserved. Programming with Visual Web Developer Chapter 9.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
Microsoft Visual Basic 2005 CHAPTER 7 Creating Web Applications.
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.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Introducing ASP.NET 2.0. Internet Technologies WWW Architecture Web Server Client Server Request Response Network HTTP TCP/IP PC/Mac/Unix + Browser (IE,
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.
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.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
ASP.NET 4 Unleashed Chapter 1. .aspx page: contains C# script and HTML code including tags. Listing 1.1 FirstPage.aspx.
ASP.NET (Active Server Page) SNU OOPSLA Lab. October 2005.
Module 4: Creating a Web Application with Web Forms
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Text INTRODUCTION TO ASP.NET. InterComm Campaign Guidelines CONFIDENTIAL Simply Server side language Simplified page development model Modular, well-factored,
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.
Tutorial 6 Creating a Web Form
Validation Controls Assist your users with providing the correct type of input for your application Assist your users with providing the correct type of.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
.NET MCQs MULTIPLE CHOICE QUESTION
Computing with C# and the .NET Framework
ASP.NET Forms.
In this session, you will learn to:
Session Variables and Post Back
Section 17.1 Section 17.2 Add an audio file using HTML
Working with Forms and Regular Expressions
.Net Table of contents Introduction to VS 2005
Unit 27 - Web Server Scripting
Client side & Server side scripting
Anatomy of an ASP.NET Page
WEB PROGRAMMING JavaScript.
12/9/2018 Session 9.1 Calendar and Validation Controls Using Sessions
PHP.
Module 10: Creating a Web Application with Web Forms
Static and Dynamic Web Pages
PART 2.
Web Development Using ASP .NET
Presentation transcript:

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 is an example of a web application.

Static and Dynamic Page The content of a web application that consists of only HTML pages is static. It does not respond dynamically to the actions performed buy users. To respond dynamically to user request we create Dynamic pages.

Types of Scripting Client Side Scripting Server Side Scripting

Client Side Scripting Enables you to develop Web pages that can dynamically respond to user input without having to interact with a Web server.

Advantages of Client Side Scripting Reduce network traffic Speed up the response time

CSS Language VB Script Java Script

Server Side Scripting Provides dynamic content to users based on the information stored in a remote location. It executed on a Web Server.

SSS Language Active Server Pages (ASP) Java Server Pages (JSP)

ASP. Net .Net version of ASP introduced by Microsoft. To help developers create globally distributed software with Internet functionality. Enable you to access information from data source. Enables you to separate HTML design from the data retrieval mechanism.

Elements in ASP. Net Web Forms Configuration Files XML Web Service Files State Management Runtime Services

Web Forms Web forms enable you to include user interface such as TextBox,ListBox and application logic of web applications.

Configuration File Enable you to store the configuration settings of an ASP. Net application.

Development Environment .Net Framework ISS (Internet Information Services)

IIS IIS server enables you to access the ASP. Net web application. It's work as a Web server on the network. Web server for windows platform)

Working of an ASP. Net application Web browser send a request by URL IIS receive and retrieves the appropriate file from the memory. Forward it to ASP. Net script engine. Script Engine to ISS ISS to client

Features of ASP. Net Compiled Code Enriched Tool Support(WYSIWYG) Power and Flexibility Simplicity Manageability (xml) Scalability (further enhancement) Security

Programming Models in ASP. Net Web Forms Web Services

Check your self What is a Web Application? What’s the difference between Static and Dynamic pages? What is Scripting? How many types of Scripting Languages? Describe about Client Side Scripting? Describe about server Side Scripting? What’s are the advantage of client side scripting?

Write down some Client Side Scripting Languages? Write down some Server Side Scripting Languages? What’s are the advantages of ASP. Net? What is ISS?

Web Services Enable you to access certain functionality at the server side. These services enable the exchange of data in a client to server or a server to server environment over the web.

Controls in ASP. Net System. Object System.Web.UI System.Web.UI.Control System.Web.UI.WebControls System.Web.UI.HTMLControls

Types of Controls ASP. Net HTML controls ASP. Net Web controls Validation controls User controls

HTML controls Replicas of the standard HTML tag HTML tag are converted into HTML controls by using attributes such as ID etc. <Input Type = Text Runat =“server” ID = “textbox1” value = “welcome”>

Web Controls Basic Web controls List controls Rich Web controls textbox,label,button,hyperlink,radiobutton etc. List controls Listbox,dropdownlist,checkboxlist etc. Rich Web controls Calendar etc. Data controls Datagrid,datalist,repeater

Validation controls Used to validate the user input. Attached to input controls to check the values that a user enters for input controls.

Types of Validation Controls Compare Validator Custum Validator Range Validator Regular Validator RequiredField Validator Validation Summary

User Controls User Controls are ASP. Net pages that are converted into controls. Extension is .ascx

File used in an ASP.Net Application AssemblyInfo.cs :- This file contains a set of attributes that contain general information about the assembly such as the name, description and version of the assembly.

Global.asax:- Each web application will have one Global.asax file attached to it. It contains scripts that define the start and end events of the application.

Web.config:- This is the configuration file for your application. It is an XML file that contains configuration data.

Code Behind Feature of ASP. Net The code behind future of ASP. Net enables you to divide an ASP. Net page in to two files. One file contains the presentation content and other file which is called the code behind file, contains all application logic. Presentation file -.aspx Code behind file - .cs

Automatically Generated Code <%@ Page language =“C#” Codebehind=“WebForm1.aspx.cs” AutoEventWireup=“false” Inherits=“WebApplication1.WebForm1” Language : Any .NET Framework supported language

AutoEventWireup Whether the page Framework calls page events and methods automatically for an ASP. Net page Default value is set to false. False value indicate that you must explicitly write code to bind page events.

Codebehind and Inherits The code behind file for a page. The class in the code behind file that a page inherits. This class can be any class derived from the Page class.

Code Inline The practice of writing application logic in the presentation file is known as code inline.

Page Events Init Load Control Unload

Init and Load event You can write the page initialization code in the Init or Load event of the Web Page. Page_Init is the event handler for the Init event and Page_Load is the event handler for the Load event of the page.

Difference between Init and Load There is a difference between the Init and Load event. When the Init event is fired all controls are loaded with their default values. On the other hand when the Load event is fired the controls are loaded in the memory with values that are set during the round trip.

Round Trip A round trip is a sequence of events that a web page follows to complete the journey from a web browser to a web server.

Control Event After the Init and Load event the page is served to user. When the user interact with the page to generate a control event such as click on a button the page is posted back to the server and the code in the control’s event handler is executed. After processing the page is re crated and the page follow the same Init and Load events.

IsPostBack Property of the Web Page You can avoid the firing of Init and Load event by using the IsPostBack property of a web page. It’s allow you to check whether the page is being requested for the first time.

Unload event Finally when a user close the page or exits from the browser the page is unloaded from the memory and the Unload event is fired.

Code Declaration Blocks We can add application logic or code in two different ways. One is in code behind file and another is in html code. Mostly we prefer Code behind future. If we write code in html then it’s known as Code Declaration Blocks. <script language=“lan.name” runat=“server”> ----------------------- </script>

ASP. Net Built in Objects ASP. Net has a number of built in objects that run on a Web server. Built in Objects in ASP. Net are – Application Request Response Server Session

Application Object The Application object is used to store and retrieve information that can be shared among all the users of an application. Provides access to application-wide methods and events for all sessions. Application state is a data repository available to all classes in an ASP.NET application. Application state is stored in memory on the server and is faster than storing and retrieving information in a database. Application state applies to all users and all sessions. Therefore, application state is a useful place to store small amounts of often-used data that does not change from one user to another.

Request objects Request:- The request object is used to access the information sent in a request from a browser to the server.

Response object Response :- The response object is used to send information to the browser.

Server object Server :- The server object is used to access various utility functions on the server.

Session object The session object is used to store and retrieve information about particular user sessions. It is use to persist information throughout the user session. ASP. Net session state enables you to store and retrieve values for a user as the user navigates the different ASP. Net pages that make up a Web application. ASP. Net session state is enabled by default for all ASP. Net applications. ASP. Net session-state variables are easily set and retrieved using the Session property, which stores session variable.

RequiredField Validator You can specify that a user must provide information in a specific control on an ASP.NET Web page by adding a RequiredFieldValidator control to the page and linking it to the required control. For example, you can specify that users must fill in a Name text box before they can submit a registration form.

Properties for RequiredField Validator ControlToValidate – Used to specify the ID of the control that is to be validated. ErrorMessege – Message that we want to show at the time of error Text – For showing the text when error occur.

Example –RequiredField Validator

RegularExpressionValidator The RegularExpressionValidator control performs its validation by comparing the data value to the regular expression pattern. If the data value in the control does not match the regular expression the RegularExpressionValidator control displays error.

Properties for RegularExpression Validator ControlToValidate ErrorMessege ValidationExpression – Validation condition for validate the control. By default different types of validation statements are present in it.

Validation Expression [] – a set of characters Used to match any one of the characters with in [].we can specify a range of characters by listing the starting and ending characters separated by a dash like [a-z]. Exa – “A[5-9]” The above expression can be used to validate a product id that start with the letter A followed by a digit with in range of 5 to 9.

Validation Expression {n} –Tagged expression Used to match an expression exactly n times. Exa – “A[0-5]{6}” The above expression can be used to validate a product id that starts with the letter A followed by six digits ranging from 0 to 5.

Validation Expression \w – Word characters Used to match any letter, numeric and underscore character. “\w{8,20}” The above expression can be used to validate a password with the minimum length of 8 characters and a maximum length of 20 characters.

Validation Expression . – any character Used to match any one character “17.09.1983” The above expression can be used to check for date formats such as 17/09/1983,17-09-1983 etc.

Validation Expression /s – any nonwhite space character used to match any character except spaces, tabs and line breaks. http://\s\s\s\s.\s\s\s The above expression can be used to check whether a valid web address has been entered such as http://noon.com,http://your.com etc.

Validation Expression + - one or more character Used to match at least one occurrence of the preceding expression “\s+@\s+.\s+” The above expression can be used to validate an email id such as aaa@yahoo.com, sani@gmail.com

Validation Expression ? - any single character Used to match any single preceding character in an expression “students?” The above expression can be used to specify that the letter s is optional. Therefore you can use the above expression to check whether a user has entered any word other than student or students.

Validation Expression \d – any digit character Used to match any digit in the range 0 to 9. “\d{6}” The above expression can be used to check for a pin code that has exactly 6 digits.

Compare Validator use the CompareValidator control to compare the data value entered by the user to a value in another control.

Properties for Compare Validator ControlToCompare – Used to specify the ID of the control that will used to compare values. ControlToValidate – Used to specify the ID of the control is to be validator. ErrorMessege ValueToCompare

Range Validator This control is used to check whether the value of a particular control with in the minimum number and the maximum number. The minimum and maximum number values can be dates, number etc.

Properties of Range Validator Control to validate Error massage Maximum value Minimum value

Validation Summary This control is used to summarize all errors and display the error list in a user specified location.

Properties of Validation Summary HeadText – used to set the text that will be displayed at the top of the summary. ShowMessegeBox – Used to display the error message in a pop up message box when the value of this property is True. ShowSummary – Used to enable or disable the summary of error messages.

Data Binding Data Binding helps you develop such applications where controls can be bound to the values stored in a data source.

Syntax for data binding <%# expression %> Consider the following line of code added in the HTML view of a web form – <asp:TextBox id = “Name” Text = “<%# source %>” runat = “server”></asp:TextBox>

Data Binding Expression The portion of the code delimited with the characters <%# and %> is called Data Binding Expression. We can only include data binding syntax expression with in it.

DataBind() Method Any server control will not display data source values until we use the DataBind() method. The DataBind() method evaluates the data binding expression and displays the evaluated expression in the server control. We can write the following line of code in the Load event of the Web Form to evaluate all the binding expressions in the page: Page.DataBind(); or DataBind(); If we have just a single control for binding then we can use the DataBind() with that perticuler control.

Type of Data Binding Single Value Data Binding Multi Record Binding

Single Value Data Binding Single value data binding involves binding controls which can display a single data value at a time. Exa. – label control, textbox control

Multi Record Data Binding