 Types of Server Controls,  HTML Server Controls,  Web Controls,  List Controls,  Input Validation Controls,  Rich Controls.

Slides:



Advertisements
Similar presentations
The Image control supports the following properties (this is not a complete list): AlternateText Enables you to provide alternate text for the image (required.
Advertisements

Use Tables for Layout Control Day 7. You will learn to: Understand Tables Create a Simple Table Modify Your Tables Appearance Create Page Layouts with.
Chapter 3 – Web Design Tables & Page Layout
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Current Popular IT I Pertemuan 3 Matakuliah: T0403/Current Popular IT I Tahun: 2008.
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.
Tutorial 4: Designing a Web Page with Tables
Asp.NET Core Server Controls. Slide 2 Lecture Overview Understanding the types of ASP.NET controls HTML controls ASP.NET (Web) controls.
XHTML1 Tables and Lists. XHTML2 Objectives In this chapter, you will: Create basic tables Structure tables Format tables Create lists.
Unit 2, cont. September 14 HTML,Validating your pages, Publishing your site.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 3-1 of…
Using HTML Tables.
Database-Driven Web Sites, Second Edition1 Chapter 2 INTRODUCTION TO HTML.
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
Creating Web Page Forms
HTML. Goals How to use the Komodo editor HTML coding and testing Basic HTML tags List and Images Tables and Links At least 2 pages and navigation
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 9: HTML Frames.
XHTML1 Topics Work with the Frameset Document Type Definition (DTD) Create frames Use the target and base attributes Create nested frames Format frames.
INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 06: Tables - Spring 2011.
HTML Tables and Forms Creating Web Pages with HTML CIS 133 Web Programming Concepts 1.
Chapter 5 Working with Tables. Agenda Add a Table Assign a Table Border Adjust Cell Padding and Spacing Adjust Cell Width and Height Add Column Labels.
HTML Tables. Start of page where we want to place a table.
HTML. Goals How to use the Komodo editor HTML coding and testing – List and Images – Tables and Links – At least 2 pages and navigation –
ASP.NET Programming with C# and SQL Server First Edition
Overview This presentation covers the initial overview of the different server controls. 2.
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.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
HTML Comprehensive Concepts and Techniques Second Edition Project 3 Creating Tables in a Web Site.
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.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
Chapter 71 Building Data-Driven ASP.NET Applications Introduction to ASP.NET By Kathleen Kalata.
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.
Creating a Web Site to Gather Data and Conduct Research.
Dr. Nuha El-KhaliliInternet Programming ( ) HTML Hyper Text Markup Language The language of web pages Maintained by the W3C
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.
Website Development with Dreamweaver
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,
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.
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Introduction to ASP.NET T.Ahlam Algharasi. The Visual Studio IDE Start page 2.
XHTML 1.1  Derived from Standard Generalized Markup Language (SGML) of ISO  XHTML concerned primary with content rather than presentation and style 
CIS234A- Lecture 7 Instructor Greg D’Andrea. Tables A table can be displayed on a Web page either in a text or graphical format. A text table: – contains.
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,
Lecture 6 More Advanced HTML Boriana Koleva Room: C54
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
CSE 409 – Advanced Internet Technology 1 DISCUSSION OF BASIC HTML TAGS.
Introduction to HTML. _______________________________________________________________________________________________________________ 2 Outline Key issues.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
Asp.NET Core Server Controls. Slide 2 Lecture Overview Understanding the types of ASP.NET controls HTML controls ASP.NET (Web) controls.
New Generation University Faculty of Computer Science Chapter Five: File Uploaded and Ad Rotate Lecturer: Mukhtar Mohamed Ali “Hakaale”
20-753: Fundamentals of Web Programming 1 Lecture 6: Advanced HTML Fundamentals of Web Programming Lecture 6: Advanced HTML.
1111 Creating ASPX Controls Programatically Objectives You will be able to Dynamically add controls to a page. Dynamically alter properties of controls.
`. Lecture Overview HTML Body Elements Linking techniques HyperText references Linking images Linking to locations on a page Linking to a fragment on.
©SoftMoore ConsultingSlide 1 Introduction to HTML: Block-Level Elements.
HTML Tutorial. What is HTML HTML is a markup language for describing web documents (web pages) HTML documents are described by HTML tags Each HTML tag.
Glencoe Introduction to Web Design Chapter 4 XHTML Basics 1 Review Do you remember the vocabulary terms from this chapter? Use the following slides to.
ASP.NET Web Controls.
Module 05: Building ASP .NET Applications
Web Development Using ASP .NET
Presentation transcript:

 Types of Server Controls,  HTML Server Controls,  Web Controls,  List Controls,  Input Validation Controls,  Rich Controls

2  ASP.NET server controls are a fundamental part of the ASP.NET architecture.  Server controls are classes in the.NET Framework that represent visual elements on a web form  Some of these classes are relatively straightforward and map closely to a specific HTML tag.  Other controls are much more ambitious abstractions that render a more complex representation

3 ASP.NET offers many different server controls. HTML server controls:  Classes that wrap the standard HTML elements.  Two examples include HtmlAnchor (for the tag) and HtmlSelect (for the tag)  Can turn any HTML tag into a server control  If there isn’t a direct corresponding class, ASP.NET will simply use the HtmlGenericControl class. simply add the runat="server" attribute to turn into server control

4 Web controls:  Duplicate the functionalities of the basic HTML elements  But have a more consistent and meaningful set of properties and methods that make it easier for the developer to declare and access them  Some examples are the HyperLink, ListBox, and Button controls.  More special types of web controls are also available.

5 Rich controls :  Advanced controls have the ability to generate a large amount of HTML markup and even client-side JavaScript to create the interface.  Examples include the Calendar, AdRotator, and TreeView controls.

6 Validation controls:  Set of controls allows you to easily validate an associated input control against several standard or user-defined rules.  Can specify that the input can’t be empty, that it must be a number  If validation fails, you can prevent page processing or allow these controls to show inline error messages in the page.

7 Data controls  Include sophisticated grids and lists that are designed to display large amounts of data, with support for advanced features such as editing, sorting.  Includes the data source controls that allow you to bind to different data sources declaratively, without writing extra code.

8 Navigation controls  Designed to display site maps and allow the user to navigate from one page to another. Login controls  Support forms authentication, an ASP.NET model for authenticating users against a database and tracking their status  Can use these controls to get prebuilt, customizable login pages, password recovery, and user-creation wizards.

9 All server controls derive from the base Control class in the System.Web.UI namespace.

10 Most commonly used members of the Control class PropertyDescription ClientIDIdentifier of the control ControlsReturns the collection of child controls EnableViewStateReturns or sets a Boolean value related to view state of control IDReturns or sets the identifier of the control PageReturns a reference to the page object that contains the control ParentReturns a reference to the control’s parent VisibleReturns or sets a Boolean value indicating whether the control should be Rendered

11  Defined in the namespace System.Web.UI.HtmlControls

12 HTML server controls on the page is the same as what you use for normal static HTML tags, with the addition of the runat="server“ attribute. Complete this slide – page 120 Tag Declaration.NET ClassSpecific Members HtmlAnchorHRef, Target, Title, Name, ServerClick event HtmlButtonCausesValidation, ValidationGroup, ServerClick event HtmlFormEnctype, Method, Target, DefaultButton, DefaultFocus HtmlImageAlign, Alt, Border, Height, Src, Width

13 Tag Declaration.NET ClassSpecific Members HtmlInputButtonType, Value, CausesValidation, ValidationGroup, ServerClick event HtmlInputResetType, Value HtmlInputSubmitType, Value, CausesValidation, ValidationGroup, ServerClick event HtmlInputCheckBoxChecked, Type, Value, ServerClick event

14 Tag Declaration.NET ClassSpecific Members HtmlInputFileAccept, MaxLength, PostedFile, Size, Type, Value HtmlInputHiddenType, Value, ServerChange event HtmlInputImageAlign, Alt, Border, Src, Type, Value, CausesValidation, ValidationGroup, ServerClick event HtmlInputRadioButtonChecked, Type, Value, ServerChange event

15 Tag Declaration.NET ClassSpecific Members HtmlInputTextMaxLength, Type, Value, ServerChange event HtmlInputPasswordMaxLength, Type, Value, ServerChange event HtmlSelectMultiple, SelectedIndex, Size, Value, DataSource, DataTextField, DataValueField, Items (collection), ServerChange event, HtmlTableAlign, BgColor, Border, BorderColor, CellPadding, CellSpacing, Height, NoWrap, Width, Rows (collection)

16 Tag Declaration.NET ClassSpecific Members HtmlTableCellAlign, BgColor, Border, BorderColor, ColSpan, Height, NoWrap, RowSpan, VAlign, Width HtmlTableRowAlign, BgColor, Border, BorderColor, Height, VAlign, Cells (collection) HtmlTextAreaCols, Rows, Value, ServerChange event Any other HTML tag with the runat="server" attribute HtmlGenericControlNone

17  HTML server controls provide a sparse event model with two possible events: ServerClick and ServerChange.  The ServerClick event is simply a click that is processed on the server side  The ServerChange event responds when a change has been made to a text or selection control

18 EventControls That Provide It ServerClickHtmlAnchor, HtmlButton, HtmlInputButton, HtmlInputSubmit,HtmlInputReset, HtmlInputImage ServerChangeHtmlInputText, HtmlInputCheckBox, HtmlInputRadioButton, HtmlInputHidden, HtmlSelect, HtmlTextArea HTML Control Events

19 Portion of the Inheritance Hierarchy for Web Controls

20  HTML server controls provide a relatively fast way to migrate to ASP.NET  ASP.NET provides a higher-level web control model  web controls are defined in the System.Web.UI.WebControls namespace  Web controls also enable additional features, such as automatic postback  Extended controls don’t just map a single HTML tag but instead generate more complex output made up of several HTML tags and JavaScript code

21  All the web controls inherit from the WebControl class.  The WebControl class also derives from Control.

22 PropertyDescription AccessKeyReturns or sets the keyboard shortcut that allows the user to quickly navigate to the control. BackColorReturns or sets the background color BorderColorReturns or sets the border color BorderStyleOne of the values from the BorderStyle enumeration, including Dashed, Dotted, Double, Groove, Ridge, Inset, Outset, Solid, and None.

23 PropertyDescription BorderWidthReturns or sets the border width. CssClassReturns or sets the CSS style to associate with the control. The CSS style can be defined in a section at the top of the page or in a separate CSS file referenced by the page. EnabledReturns or sets the control’s enabled state. If false, the control is usually rendered grayed out and is not usable. FontReturns an object with all the style information of the font used for the control’s text.

24 PropertyDescription ForeColorReturns or sets the foreground color. HeightReturns or sets the control’s height. TabIndexA number that allows you to control the tab order. This property is supported only in Internet Explorer 4.0 and higher. TooltipDisplays a text message when the user hovers the mouse above the control. Many older browsers don’t support this property. WidthReturns or sets the control’s width.

25 ASP.NETGenerated HTMLKey Members or Text, CausesValidation, PostBackUrl,ValidationG roup, Click event AutoPostBack, Checked, Text, TextAlign, CheckedChanged event FileBytes, FileContent, FileName, HasFile, PostedFile, SaveAs() Value

26 ASP.NETGenerated HTMLKey Members... ImageUrl, NavigateUrl, Target, Text AlternateText, ImageAlign, ImageUrl CausesValidation, ValidationGroup, Click event HotSpotMode, HotSpots (collection), AlternateText, ImageAlign, ImageUrl

27 ASP.NETGenerated HTMLKey Members... Text, AssociatedControlID Text, CausesValidation, Validation- Group, Click event... BackImageUrl, DefaultButton, GroupingText, HorizontalAlign, Scrollbars, Wrap AutoPostBack, Checked, GroupName, Text, TextAlign, CheckedChanged event

28 ASP.NETGenerated HTMLKey Members... BackImageUrl, CellPadding, CellSpacing, GridLines, HorizontalAlign, Rows (collection)... ColumnSpan, HorizontalAlign, RowSpan, Text, VerticalAlign, Wrap... Cells (collection), HorizontalAlign, VerticalAlign or... AutoPostBack, Columns, MaxLength, ReadOnly, Rows, Text, TextMode, Wrap, TextChanged event

29 Differences: The control is declared using its class name (TextBox) instead of the HTML tag name (input). The default content is set with the Text property, instead of a less obvious Value attribute. The style attributes (colors, width, and font) are set by direct properties, instead of being grouped together in a single style attribute.

30  Server-side events work in much the same way as the server events of the HTML server controls.  Web controls support the AutoPostBack feature.  Example application adds a new entry to a list control every time one of the events occurs

31  The list controls are specialized web controls that generate list boxes, drop-down lists, and other repeating controls.  Can be either bound to a data source  Allow the user to select one or more items

32 ControlDescription A drop-down list populated by a collection of objects.In HTML, it is rendered by a tag with the size="1" attribute. A list box list populated by a collection of objects. In HTML, it is rendered by a tag with the size="x" attribute, where x is the number of visible items. Its items are rendered as check boxes. Like the, but the items are rendered as radiobuttons. A static bulleted or numbered list. In HTML, it is rendered using the or tags( Can use to create list of hyperlinks).

33  The selectable list controls include the DropDownList, ListBox, CheckBoxList, and RadioButtonList controls.  RadioButtonList and CheckBoxList render multiple option buttons or check Boxes.

34 The BulletedList control is the server-side equivalent of the (unordered list) or PropertyDescription BulletStyleDetermines the type of list BulletImageUrlIf the BulletStyle is set to CustomImage, this points to the image. FirstBulletNumberthis sets the first value DisplayModeDetermines whether the text of each item is rendered as text or a hyperlink

 Rich controls provide an object model that has a complex HTML representation and also client side JavaScript.  Examples:- AdRotator Calendar

 Steps for using AdRotator  Define the XML schedule file with tag and its properties defined  Specify Advertisement file value un AdRotator definition in Page design view.  AdCreated event can be trapped

TAG Description The image that will be displayed. The link will be followed if user clicks the banner. The text will be displayed in place of picture. A new ad is selected whenever the Web page refreshes. An impression attribute can be assigned to each ad. It controls how often an ad is selected relative to other ad in ad file