ASP.NET Web Server Controls Basic Web Server Controls.

Slides:



Advertisements
Similar presentations
Tutorial 6 Creating a Web Form
Advertisements

Measurement Many CSS properties (values within the declaration) require that you specify a unit of measurement, such as spacing between elements, border.
Chapter 8 Creating Style Sheets.
9-May-15 More CSS. 2 A different emphasis CSS is the same for XML as it is for HTML and XHTML, but-- XML contains no display information If you want your.
Week 9 Using the Box Properties. 9-2 The CSS Visual Formatting Model Describes how the element content boxes should be displayed by the browser –Based.
CSS. What does it stand for? Cascading Style Sheets.
Tutorial 3 Introducing Cascading Style Sheets. XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Learn about Cascading Style Sheets Write.
IT533 Lecture ASP.NET Controls. Installations Microsoft® SQL Server® 2008 Express.
Asp.NET Core Server Controls. Slide 2 Lecture Overview Understanding the types of ASP.NET controls HTML controls ASP.NET (Web) controls.
Web Development in Microsoft Visual Studio Slide 2 Lecture Overview Introduce Visual Studio 2013 Create a first ASP.NET application.
Using Cascading Style Sheets CSS Basics. Goals Understand basic syntax of Cascading Style Sheets (CSS) Understand basic syntax of Cascading Style Sheets.
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.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
ASP.NET Programming with C# and SQL Server First Edition
Web Forms. Agenda Web forms Web controls Code separation Dynamic compilation System.Web.UI.Page User controls.
CST JavaScript Validating Form Data with JavaScript.
Overview This presentation covers the initial overview of the different server controls. 2.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
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.
Database-Driven Web Sites, Second Edition1 Chapter 8 Processing ASP.NET Web Forms and Working With Server Controls.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Chapter 6: Forms JavaScript - Introductory. Previewing the Product Registration Form.
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.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
ASP.Net Web Applications. Characteristics of a typical data driven web application Web Server HTML Graphics Active-X Java Applets HTTP Request ADO / JDBC.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Introducing Web Controls Outline 29.1 Analyzing the.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 4-1 of…
CSS The Definitive Guide Chapter 8.  Allows one to define borders for  paragraphs  headings  divs  anchors  images  and more.
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.
Web Controls Chapter-7. Page  2 Synopsis  Stepping Up to Web controls  Basic Web control classes  Web control classes  Web control Base class  Units,
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.
CSS Border.
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.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
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.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
Microsoft Visual Basic 2005 CHAPTER 7 Creating Web Applications.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 3 Welcome Application Introduction to Visual Programming.
HTML Forms.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
 Types of Server Controls,  HTML Server Controls,  Web Controls,  List Controls,  Input Validation Controls,  Rich Controls.
WaveMaker Visual AJAX Studio 4.0 Training Basics: Building Your First Application Designer Basics.
Module 4: Creating a Microsoft ASP.NET Web Form. Overview Creating Web Forms Using Server Controls.
Week Developing Web Applications 12. Programming for the Web A Web Application Runs on a Web Server and Presents Its Content to the User Across a Network,
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
Introduction to HTML. _______________________________________________________________________________________________________________ 2 Outline Key issues.
Asp.NET Core Server Controls. Slide 2 Lecture Overview Understanding the types of ASP.NET controls HTML controls ASP.NET (Web) controls.
20-753: Fundamentals of Web Programming 1 Lecture 6: Advanced HTML Fundamentals of Web Programming Lecture 6: Advanced HTML.
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.
 ASP.NET provides an event based programming model that simplifies web programming  All GUI applications are incomplete without enabling actions  These.
Beginning ASP.NET in C# and VB Chapter 9
Tutorial 6 Creating a Web Form
CSS. What does it stand for? ___________________.
CSS. What does it stand for? Cascading Style Sheet.
WaveMaker Visual AJAX Studio 4.0 Training Styling your application.
Chapter 1: An Introduction to Visual Basic 2015
ASP.NET Web Controls.
© 2016, Mike Murach & Associates, Inc.
Cascading Style Sheets (Formatting)
Second CSS Lecture Applications to XML
Web Development Using ASP .NET
E-commerce Applications Development
Programming with Microsoft Visual Basic 2008 Fourth Edition
Presentation transcript:

ASP.NET Web Server Controls Basic Web Server Controls

Overview The ASP.NET page framework includes a number of built-in server controls that are designed to provide a more structured programming model for the Web. These controls provide the following features: – Automatic state management. – Simple access to object values without having to use the Request object. – Ability to react to events in server-side code to create applications that are better structured. – Common approach to building user interfaces for Web pages. – Output is automatically customized based on the capabilities of the browser.

ASP.NET Web Server Controls Server controls are added to a page, and programmers write code to handle events raised by users’ interaction with the controls at runtime. Built in Server controls are divided into two groups: – HTML controls Reside in the System.Web.UI.HTMLControls namespace Map 1-to-1 with the standard HTML elements – Web controls Reside in the System.Web.UI.WebControls namespace Very similar to the Visual Basic UI controls All Web controls use the prefix asp

Web Server Control Categories Basic Web Controls – Commonly used user input controls such as labels, text boxes, and drop-down lists Validation Controls – used to validate the values that are entered into other controls of the page – perform client-side validation, server-side validation, or both List Controls – support binding to collections – display rows of data in a customized, templated format Rich Controls – task-specific controls with rich functionality – Examples: AdRotator and Calendar controls

Basic Web Server Controls Label TextBox CheckBox RadioButton DropDownList Image Panel Button HyperLink ImageButton LinkButton Literal PlaceHolder Table TableCell TableRow

Using Web Server Controls Add server control to page Set server control properties Add event handler if needed

Web Server Control Properties The System.Web.UI.WebControls.WebControl base class contains all of the common properties. Most of the Web server controls derive from this class. See the next slide for a list of common properties.

Property AccessKeyThe control's keyboard shortcut key (AccessKey). It specifies a single letter or number that the user can press while pressing ALT. AttributesThe collection of additional attributes on the control not defined by a public property, but that should also be rendered. Any attribute that is not defined by the Web server control is added to this collection. BackColorThe background color of the control. The BackColor property can be set using standard HTML color identifiers: the name of a color ("black" or "red") or an RGB value expressed in hexadecimal format ("#ffffff"). BorderColorThe border color of the control. The BorderColor property can be set using standard HTML color identifiers: the name of a color ("black" or "red") or an RGB value expressed in hexadecimal format ("#ffffff"). BorderWidthThe width of the control's border (if any) in pixels. Note This property might not work for all controls in browsers earlier than Internet Explorer 4.0. BorderStyleThe control's border style, if any. The possible values are: NotSet, None, Dotted, Dashed, Solid, Double, Groove, Ridge, Inset, Outset CssClassThe cascading style sheets (CSS) class to assign to the control. StyleA collection of text attributes that are rendered as a CSS style attribute on the outer tag of the control. Note Any style values set using style properties (for example, BackColor) will automatically override a corresponding value in this collection. EnabledMakes the control functional when this property is set to true (the default). Disables the control when this property is set to false. Note Disabling a control dims the control and makes it inactive. It does not hide the control. FontProvides font information for the Web server control that you are declaring. ForeColorThe foreground color of the control. Note This property might not work for all controls in browsers earlier than Internet Explorer 4.0. HeightThe control's height. Note This property might not work for all controls in browsers earlier than Internet Explorer 4.0. TabIndexThe control's position in the tab order. If this property is not set, the control's position index is 0. Controls with the same tab index are moved to according to the order in which they are declared in the Web page. Note This property only works in Microsoft Internet Explorer 4.0 and later. ToolTipThe text that appears when the user rests the mouse pointer over a control. Note The ToolTip property does not work in all browsers. Check with the browser for compatibility. Width The fixed width of the control. The possible units are: Pixel, Point, Pica, Inch, Mm, Cm, Percentage, Em Ex Note The default unit is pixels. Not all browsers support every unit type.

Event Model One of the key features of ASP.NET is that it uses an event-based programming model. An event handler is a method that determines what actions are performed when an event occurs, such as when the user clicks a button or selects an item from a list. When an event is raised, the handler for that specific event is executed

Event Handlers In the.NET Framework, all event handlers have a specific method signature, that is, a specific return type and parameters. Event handlers are always void methods. Event handlers always accept two parameters: – an object parameter – an EventArgs parameter (or a subclass of EventArgs, such as CommandEventArgs or ImageClickEventArgs).