Module 4: Creating a Microsoft ASP.NET Web Form. Overview Creating Web Forms Using Server Controls.

Slides:



Advertisements
Similar presentations
11 Getting Started with ASP.NET Beginning ASP.NET 4.0 in C# 2010 Chapters 5 and 6.
Advertisements

Web Forms and ASP.NET Programming Right from the Start with Visual Basic.NET 1/e 12.
11 ASP.NET Slides based off:. 22 B ACKGROUND - W EB A RCHITECTURE Web Server PC/Mac/Unix/... + Browser Client Server Request:
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 1.1 of…
Web-Based Applications
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 3-1 of…
Introduction to ASP.Net ISYS 350. ASP.NET ASP.NET is a server-side technology for creating dynamic web pages. ASP.NET allows you to use a selection of.
CGI Programming: Part 1. What is CGI? CGI = Common Gateway Interface Provides a standardized way for web browsers to: –Call programs on a server. –Pass.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Chapter 10 Form Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Joe Hummel, PhD Dept of Mathematics and Computer Science Lake Forest College Lecture 8: WebForms — Web-based.
ASP.Net, Web Forms and Web Controls 1 Outline Introduction Simple HTTP Transaction System Architecture Creating and Running a Simple Web Form Example Web.
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.
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 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.
DR.JOHN ABRAHAM PROFESSOR UTPA ASP.NET. ACTIVE SERVER PAGES (ASP) Web application development environment Web applications use web browser to display.
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.
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.
HTML, GUI, ASP.NET Rina Zviel-Girshin Lecture 2
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.
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 Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 4-1 of…
Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours Digital Media.
Chapter 9 Programming with Web Forms Programming In Visual Basic.NET.
ASP.NET Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours Digital.
ASP.Net, Web Forms and Web Controls 1 Outline Web Controls Text and Graphics Controls AdRotator Control Validation Controls.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
ASP.NET Web Server Controls Basic Web Server Controls.
Web Controls Chapter-7. Page  2 Synopsis  Stepping Up to Web controls  Basic Web control classes  Web control classes  Web control Base class  Units,
© Minder Chen, ASP.NET 2.0: Introduction - 1 ASP.NET 2.0 Minder Chen, Ph.D. Framework Base Class Library ADO.NET: Data & XML.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
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.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
Introduction to ASP.NET1. 2 Web applications in general Web applications are divided into two parts –The server part –The client part The server part.
HTML Forms.
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 2 : Creating a Microsoft ASP.NET Web Form.
Session 4: HTML and Web Server Controls. Outline Creating Web Forms Using Server Controls HTML Server Controls Web Server Controls Writing ASP Code Inline.
Module 1: Working with ASP.NET. Overview Introducing ASP.NET Creating Web Forms Adding ASP.NET Code to a Page Handling Page Events Discussion: ASP vs.
Module 2: Using Microsoft Visual Studio.NET. Overview Overview of Visual Studio.NET Creating an ASP.NET Web Application Project.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
ASP.Net, Web Forms and Web Controls 1 Outline Session Tracking Cookies Session Tracking with HttpSessionState.
Module 8: Creating User Controls. Overview Adding User Controls to an ASP.NET Web Form Creating User Controls.
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.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
 Previous lessons have focused on client-side scripts  Programs embedded in the page’s HTML code  Can also execute scripts on the server  Server-side.
Web Application Development Introduction. Lesson: Creating Web Forms What is a Web Form? Creating a Web Form with Visual Studio.NET.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
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.
ASP.net Course From Intermediate to Advance level By Arsalan Ahmed 3 Months Course Cell :
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
Computing with C# and the .NET Framework
ASP.NET Forms.
Working with ASP.NET Server Controls
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.
Haritha Dasari Josue Balandrano Coronel -
Active Server Pages ASP.Net
ASP.NET מעבדת DBMS הדס גרוסמן 2007.
Static and Dynamic Web Pages
ASP.NET.
Web Development Using ASP .NET
Basics of Web Design Chapter 10 Form Basics Key Concepts
Presentation transcript:

Module 4: Creating a Microsoft ASP.NET Web Form

Overview Creating Web Forms Using Server Controls

Lesson: Creating Web Forms What is a Web Form? Creating a Web Form with Visual Studio.NET

What Is a Web Form? Def: Consists of a combination of HTML, code, and controls that execute on a Web server that is running IIS. Web forms display a UI by generating HTML that is sent to the browser, while the supporting code and ctrls that run the UI stay on the Web server..aspx extension (works as containers for the text and ctrls that you want to display on the browser) It comprised of two separate files: .aspx (UI of the Web Form) .aspx.cs or.aspx.vb (“code-behind page” consists of supporting code)

Untitled Page What Is a Web Form? Cont. Page attributes Body attributes Form attributes

What Is a Web Form? The functions of Web form are defined by three levels of attributes: 1. Page attributes (define global functions or page specific attributes that are used by the ASP.Net page parser and compiler. Example : Language, AutoEventWireUp, Codebehind 2. Body attributes (define how a page will be displayed on the client’s browser. Example: style

What Is a Web Form? Cont. Form attributes: defines how groups of ctrls will be processed. Only one server side form on an.aspx.page. Attributes of forms: Method: identifies the method of sending ctrl values back to the server. The option are: Post – data is passed in name/value pairs within the body the HTTP request. Get – Data is passed in query string Runat: A key feature of a web form is that the controls run on the server. runat=“server” attributes causes the form to post control information back to the ASP.Net page on the server where the supporting code runs.If runat not set to server, the form will work as a regular HTML form.

Creating a Web Form with Visual Studio.NET New ASP.NET Web Applications create a default Web Form: Default1.aspx Create additional Web Forms from the Solution Explorer Upgrade existing HTML pages into Web Forms

Lesson: Using Server Controls What is a Server Control? Types of Server Controls Saving View State HTML Server Controls Web Server Controls Selecting the Appropriate Control

What is a Server Control? Def : ASP.Net server controls are components that run on the server and encapsulate UI and other related functionality. Server contrlos are used in ASP.Net pages and ASP.Net code behind classes. Server controls include buttons, text boxes and drop down lists. Runat="server" means run on the server not on user’s browser. Events happen on the server View state saved <asp:Button id="Button1" runat="server" Text="Submit"/> <asp:Button id="Button1" runat="server" Text="Submit"/>

What is a Server Control? Cont. Have built-in functionality The functionality of a control is what happens when the user clicks a button or a list box. These processes are called event procedures. Common object model All have Id and Text attributes Eg: Background color for all controls used the same property: Backcolor property. Create browser-specific HTML When a page is rendered for a browser, the Web server controls determine which browser is requesting the page and then delivers the appropriate HTML

Types of Server Controls HTML server controls HTML elements with attributes that make them visible to and programmable on the server. Web server controls Intrinsic controls Eg: button, list box, text box Validation controls - incorporate logic that allows you to test a user’s input. - Attach a validation control to the input control and specify the conditions of correct user input. - Eg: RequiredFieldValidator, ValidationSummary, RangeValidator

Types of Server Controls ( Cont.) Rich controls – a complex control that include multiple functions - Eg: AdRotator, Calendar ( displays a sequence of advertisement ) List-bound controls – can be used to display lists of data on an ASP.NET web page - to display reformat, sort and edit data - Eg: DataGrid, DataList, DropDownList, RadioButtonList

Saving View State Webforms are stateless. It does not retain any information on prior request. ViewState is a hidden control that helps to solve the problem of webpage. It will store / records the state of the controls ( setting and user inputs ) on a web page as the HTML travels back and forth between the client and server. Hidden ViewState control of name-value pairs stored in the Web Form On by default, adjustable at Web Form and control level

HTML Server Controls Based on HTML elements Exist within the System.Web.UI.HtmlControls namespace

Exist within the System.Web.UI.WebControls namespace Control syntax HTML that is generated by the control Web Server Controls <asp:TextBox id="TextBox1" runat="server">Text_to_Display <asp:TextBox id="TextBox1" runat="server">Text_to_Display <input name="TextBox1" type="text" value="Text_to_Display" Id="TextBox1"/> <input name="TextBox1" type="text" value="Text_to_Display" Id="TextBox1"/>

You need specific functionality such as a calendar or ad rotator The control will interact with client and server script You are writing a page that might be used by a variety of browsers You are working with existing HTML pages and want to quickly add ASP.NET Web page functionality You prefer a Visual Basic-like programming model You prefer an HTML-like object model Use Web Server Controls if: Use HTML Server Controls if: Bandwidth is not a problemBandwidth is limited Selecting the Appropriate Control

Exercise If you were given a Web page with an. aspx extension, what would you look for to verify that it is a Web Form? If you were given a Web page with an. aspx extension, what would you look for to see if there are Web server controls? What type of code or script does a Web server control generate on the client?

Review Creating Web Forms Using Server Controls

~ End of Slides ~