Web Development Using ASP .NET

Slides:



Advertisements
Similar presentations
Chapter 3 – Web Design Tables & Page Layout
Advertisements

Tutorial 6 Creating a Web Form
IT533 Lecture ASP.NET Controls. Installations Microsoft® SQL Server® 2008 Express.
Intermediate Level Course. Text Format The text styles, bold, italics, underlining, superscript and subscript, can be easily added to selected text. Text.
Asp.NET Core Server Controls. Slide 2 Lecture Overview Understanding the types of ASP.NET controls HTML controls ASP.NET (Web) controls.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 3-1 of…
Creating Web Page Forms
ASP.NET Programming with C# and SQL Server First Edition
CST JavaScript Validating Form Data with JavaScript.
Overview This presentation covers the initial overview of the different server controls. 2.
Introduction to.Net and ASP.Net Course Introduction Build Your Own ASP.Net Website: Chapter 1 Microsoft ASP.Net Walkthrough: Creating a Basic Web Forms.
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
XP Tutorial 6New Perspectives on HTML and XHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
CIS 375—Web App Dev II ASP.NET 2 Introducing Web Forms.
Ch6:creating consistent looking web sites. Master pages Master page defines a combination of fixed content and content place holder to hold the web page(.aspx)
Database-Driven Web Sites, Second Edition1 Chapter 8 Processing ASP.NET Web Forms and Working With Server Controls.
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.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
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.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 4-1 of…
10 Adding Interactivity to a Web Site Section 10.1 Define scripting Summarize interactivity design guidelines Identify scripting languages Compare common.
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.
Chapter 4 – Working with ASP.NET Controls Dr. Stephanos Mavromoustakos.
ASP.NET Controls. Slide 2 Lecture Overview Identify the types of controls supported by ASP.NET and the differences between them.
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.
Using Client-Side Scripts to Enhance Web Applications 1.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
 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.
 Whether using paper forms or forms on the web, forms are used for gathering information. User enter information into designated areas, or fields. Forms.
CHAPTER 7 Form & PHP. Introduction All of the following examples in this section will require two web pages. The first page retrieves information posted.
Things like Textboxes, Lables, ‘n’at. ASPX page is not HTML Controls are rendered into markup that a browser can understand Some controls are rendered.
Microsoft FrontPage 2003 Illustrated Complete Creating a Form.
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
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.
HTML Forms. Slide 2 Forms (Introduction) The purpose of input forms Organizing forms with a and Using different element types to get user input A brief.
TRAINING SESSIONS.NET Controls.  Standard Controls  Label  Textbox  Checkbox  Button, Image Button, Image control  Radio Button  Literal  Hyperlink.
Object-Oriented Application Development Using VB.NET 1 Chapter 10 VB.NET GUI Components Overview.
Chapter 27 Getting “Web-ified” (Web Applications) Clearly Visual Basic: Programming with Visual Basic nd Edition.
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.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
 ASP.NET provides an event based programming model that simplifies web programming  All GUI applications are incomplete without enabling actions  These.
Tutorial 6 Creating a Web Form
2440: 141 Web Site Administration Web Forms Instructor: Joseph Nattey.
XHTML Forms.
Section 10.1 Define scripting
Creating and Processing Web Forms
Advanced HTML Tags:.
Chapter 5 Validating Form Data with JavaScript
ASP.NET Forms.
Chapter 8: Writing Graphical User Interfaces
Objectives Design a form Create a form Create text fields
ASP.NET Web Controls.
© 2016, Mike Murach & Associates, Inc.
Basic XHTML Tables XHTML tables—a frequently used feature that organizes data into rows and columns. Tables are defined with the table element. Table.
Section 10.1 YOU WILL LEARN TO… Define scripting
Building Configurable Forms
Introducing Forms.
Unit 27 - Web Server Scripting
Static and Dynamic Web Pages
Using Cascading Style Sheets (CSS)
Building ASP.NET Applications
ASP.NET.
Database Applications
Module 05: Building ASP .NET Applications
Programming with Microsoft Visual Basic 2008 Fourth Edition
Button Web Server Controls
Presentation transcript:

Web Development Using ASP .NET … Web Development Using ASP .NET

Chapter Objectives

Web Controls  A control is an object that can be drawn on to the Web Form to enable or enhance user interaction with the application. When you create ASP.NET Web pages, you can use these types of controls: HTML server controls Web server controls Validation controls User controls

HTML server controls   HTML elements exposed to the server so you can program them. HTML server controls expose an object model that maps very closely to the HTML elements that they render. Web server controls   Controls with more built-in features than HTML server controls. Web server controls include not only form controls such as buttons and text boxes, but also special-purpose controls such as a calendar, menus, and a tree view control. Web server controls are more abstract than HTML server controls in that their object model does not necessarily reflect HTML syntax.

Validation controls  Controls that incorporate logic to enable you to what users enter for input controls such as the TextBox control. Validation controls enable you to check for a required field, to test against a specific value or pattern of characters, to verify that a value lies within a range, and so on. For more information, see Validation ASP.NET Controls. User controls  Controls that you create as ASP.NET Web pages. You can embed ASP.NET user controls in other ASP.NET Web pages, which is an easy way to create toolbars and other reusable elements. For more information

HTML server controls HTML server controls are HTML elements (or elements in other supported markup, such as XHTML) containing attributes that make them programmable in server code. By default, HTML elements on an ASP.NET Web page are not available to the server. Instead, they are treated as opaque text and passed through to the browser. However, by converting HTML elements to HTML server controls, you expose them as elements you can program on the server. The object model for HTML server controls maps closely to that of the corresponding elements. For example, HTML attributes are exposed in HTML server controls as properties.

HTML server controls Any HTML element on a page can be converted to an HTML server control by adding the attribute runat="server". During parsing, the ASP.NET page framework creates instances of all elements containing the runat="server" attribute. If you want to reference the control as a member within your code, you should also assign an id attribute to the control. The page framework provides predefined HTML server controls for the HTML elements most commonly used dynamically on a page: the form element, the input elements (text box, check box, Submit button), the select element, and so on. These predefined HTML server controls share the basic properties of the generic control, and in addition, each control typically provides its own set of properties and its own event.

Web server controls Web server controls are a second set of controls designed with a different emphasis. They do not necessarily map one-to-one to HTML server controls. Instead, they are defined as abstract controls in which the actual markup rendered by the control can be quite different from the model that you program against. For example, a RadioButtonList Web server control might be rendered in a table or as inline text with other markup. Web server controls include traditional form controls such as buttons and text boxes as well as complex controls such as tables. They also include controls that provide commonly used form functionality such as displaying data in a grid, choosing dates, displaying menus, and so on. Web server controls offer all of the features described above for HTML server controls (except one-to-one mapping to elements) and these additional features:

Web server controls A rich object model that provides type-safe programming capabilities. Automatic browser detection. The controls can detect browser capabilities and render appropriate markup. For some controls, the ability to define your own layout for the control using Templates. For some controls, the ability to specify whether a control's event causes immediate posting to the server or is instead cached and raised when the page is submitted. Support for themes, which enable you to define a consistent look for controls throughout your site. For details, see ASP.NET Themes and Skins. Ability to pass events from a nested control (such as a button in a table) to the container control.

Label The Label Web Server control is used to label other parts of the application. They are used to display text which the user can't change. To display text on a label we use the text property.

Literal A Literal Web Server control doesn't have any visual appearance on a Web Form but is used to insert literal text into a Web Form. This control makes it possible to add HTML code directly in the code designer window without switching to design view and clicking the HTML button to edit the HTML.

Buttons A Button Web Server control is a control which we click and release to perform some action. Button Event The default event of the Button is the Click event which looks like this in code: Private Sub Button1_Click(ByVal sender As System.Object,_ ByVal e As System.EventArgs) Handles Button1.Click 'Implementation Omitted End Sub

Link Button The LinkButton Web server control is a hyperlink style button control. It looks like a hyperlink control but is actually a button control with click and command events.

ImageButton Control The ImageButton Web server control is used to display images and responds to mouse clicks on the image. To set the Image for this control we use the ImageUrl property. Image buttons support both Click and Command events. When we handle Click events, we are passed the actual location of the mouse in the image. We can use Command event handlers to make the image button work like a command button.

DropDownList The DropDownList Web server control is same as the ListBox control but it supports only single selection and displays items in a drop-down manner

ListBox The ListBox Web server control displays a list of items from which we can make a selection. We can select one or more items from the list of items displayed.

CheckBox The CheckBox Web server control gives us an option to select, say, yes/no or true/false. A checkbox is clicked to select and clicked again to deselect some option. When a checkbox is selected, a check (a tick mark) appears indicating a selection.

CheckBoxList The CheckBoxList Web server control displays a number of checkboxes at once. This control provides a multi selection check box group that can be dynamically generated with data binding. It contains an Items collection with members that correspond to individual items in the list.

RadioButtonList The RadioButtonList Web server control is used to display a list of radio buttons. This control provides us with a single-selection radio button group that can be dynamically generated via data binding. The Items property of this control allows us to add items to the control.

RadioButton The RadioButton Web server control is similar to CheckBox but RadioButtons are displayed as rounded instead of box.

Image The Image Web server control is used to display an image on a Web page. To set the image to be displayed for this control we use the ImageUrl property.