Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Copy of Web Server Controls

No description
by

Saidamma palleboina

on 18 October 2012

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Copy of Web Server Controls

Presented By:- Saidamma, Rupesh Server Controls HTML Controls Server Controls Web Server Controls Server Controls ASP.NET ships with ~50 built-in controls Organized into logical families HTML controls Controls / properties map 1:1 with HTML Web controls Richer functionality More consistent object model Works well with existing HTML designers Properties map 1:1 with HTMLtable.bgcolor ="red“; Can specify client-side event handlers Good when quickly converting existing page Derived from System.Web.UI.HtmlControls.HtmlControl Supported controls have custom class, others derive from HtmlGenericControl HTML Controls Supported controls <a>
<img>
<from>
<table>
<tr>
<th>
<td>
<select> <textarea>
<button>
<input type=text>
<input type=file>
<input type=submit>
<input type=rest>
<input type=hidden> Server Controls Web Controls Consistent object model Label1.BackColor = Color.Red; Table.BackColor = Color.Blue; Richer functionality E.g. AutoPostBack, additional methods Strongly-typed; no generic control
Enables better compiler type checking Server Controls Web Controls Web controls appear in HTML markup as namespaced tags Web controls have an asp: prefix <asp:button onclick="button1_click“ runat=server> <asp:textbox onchanged="text1_changed“ runat=server> Defined in the System.Web.UI.WebControls namespace This namespace is automatically mapped to the asp: prefix Server Controls Web Controls provide extensive properties to control display and format, e.g. Font
BackColor, ForeColorBorderColor, BorderStyle, BorderWidth
Style, CssClassHeight, WidthVisible, Enabled Server Controls Four types of Web Controls Intrinsic controls List controls Rich controls Validation controls Server Controls Intrinisic Controls Correspond to HTML controls <asp:button>
<asp:imagebutton>
<asp:linkbutton>
<asp:hyperlink>
<asp:textbox>
<asp:checkbox> <asp:radiobutton>
<asp:image>
<asp:label>
<asp:panel>
<asp:table> Server Controls Intrinisic Controls TextBox, ListControl, CheckBox and their subclasses don’t automatically do a postback when their controls are changed Specify AutoPostBack=true to make change events cause a postback Server Controls List Controls Controls that handle repetition Supported controls <asp:dropdownlist>
<asp:listbox>
<asp:radiobuttonlist>
<asp:checkboxlist> <asp:repeater>
<asp:datalist>
<asp:datagrid> Repeater, DataList and DataGrid controls expose templates for customization Server Controls Custom controls with rich functionality Supported Controls <asp:calendar>
<asp:adrotator> Rich Controls More will be added
3rd party controls (http://www.telerik.com/ ) Server Controls Validation Controls A Validation server control is used to validate the data of an input control CompareValidator
CustomValidator
RangeValidator
RegularExpressionValidator
RequiredFieldValidator
ValidationSummary Validation controls are: The HierarchicalDataBoundControl  serves as a base class for those controls that display data in hierarchical format.

TreeView and Menu are the classes that inherit form HierarchicalDataBoundControl class. Hierarchical Control Figure of Detail View Control ASP.NET 2.0 shipped with a new server control, Composite DataBoundControl, which considerably cuts down on the amount of code you have to write by hand.

Composite data bound control are referred as composite as these controls use other ASP.NET controls to display bounded data to the user.

These controls inherit from the base class CompositeDataBoundControl Composite DataBound Control Types Of Data-Bound Control Dynamic Data Population Menu Text: This property is populated with the data that is to be displayed.

Value: This property is used to store the data that is posted back to the webserver.
 
NavigateUrl:  A node can be configured either as a selection node or navigation node by setting that property. If property set to an empty string it is selection mode otherwise navigation mode. Property Each entry in the tree is called a node and is represented by a tree node object.
This control contains multiple parent, child, root and leaf nodes.
If a node has no child it is called a leaf node.
You can also display a tree hierarchy without having a single root node.
Nodes can be displayed as either plain text or hyperlinks. Nodes It is a data Bound control that is used to display data in hierarchical format. For example, listing of files, folders and table of conte
This control can also be used for site navigation in combination with SiteMapDataSourceControl.nts in a tree structure. TreeView Provides a list of data.
It is unique in that it provides complete flexibility in regard to the HTML presentation of the data.
However, because there is no default look, the developer must completely describe via templates how the data is to be rendered. Repeater Control Richest Control in ASP.Net.
Uses Template For the Display of Data.
Supports Insert,Update,Delete.
Supports Layout Template, Group Template ListView Control Figure of Form View Control Like the DetailsView control, the FormView control displays a single record of data at a time and supports the editing of the record.

Unlike the DetailsView control, the FormView control requires the use of templates to define the rendering of each item, so the developer can completely customize the appearance of the record. Form View Control Displays a single record of data at a time. It provides buttons for navigating from record to record.
As well, it supports the updating, insertion, or deletion of records.
It can be used in combination with the GridView control to provide a master-detail view of your data Details View Control Figure Of Datalist Displays rows of data as items in a list.
The presentation of the data can be customized via templates. Inline editing and deleting of data is also supported by this control. Data List Control Displays data in a tabular (row-column) grid. It provides the most features of the data controls.
It supports the editing, deleting, sorting and paging of data.

There is a default look to the GridView, so little work is required to displaying an entire table of data. GridView Control GridView
DataList
DetailView
FormView
ListView
Repeater

These are the classes that directly inherit from CompositeDataBoundControl. Inherited Classes Example:- Common Property Of ListControl List controls include the following controls:=
ListBox,
DropDownList,
CheckBoxList,
RadioButtonList,
BulletedList.
Each of these controls can be data bound to a data source.  Type of List Control Figure of Repeater Control AdRotator Property List Control Figure of Tree View Control In order to display dynamic data we need to bind that control with a data source. For that purpose set the DataSourceID property of the menu control to the ID value of the data source control.

You can also bind that control to an XMLDocument object or a DataSet object that contains Data Relation Objects. Dynamic Data Population Each entry in the tree is called a node and is represented by a tree node object.

This control contains multiple parent, child, root and leaf nodes.

If a node has no child it is called a leaf node. We can also display a tree hierarchy without having a single root node.

Nodes can be displayed as either plain text or hyperlinks. Nodes The HierarchicalDataBoundControl  serves as a base class for those controls that display data in hierarchical format.

TreeView and Menu are the classes that inherit form HierarchicalDataBoundControl class. Hierarchical Control Provides a list of data.

It is unique in that it provides complete flexibility in regard to the HTML presentation of the data.

However, because there is no default look, the developer must completely describe via templates how the data is to be rendered. Repeater Control Like the DetailsView control, the FormView control displays a single record of data at a time and supports the editing of the record.

Unlike the DetailsView control, the FormView control requires the use of templates to define the rendering of each item, so the developer can completely customize the appearance of the record. Form View Control Displays a single record of data at a time. It provides buttons for navigating from record to record.

As well, it supports the updating, insertion, or deletion of records.

It can be used in combination with the GridView control to provide a master-detail view of your data Details View Control Displays rows of data as items in a list.

The presentation of the data can be customized via templates.

Inline editing and deleting of data is also supported by this control. Data List Control Displays data in a tabular (row-column) grid. It provides the most features of the data controls.

It supports the editing, deleting, sorting and paging of data.

There is a default look to the GridView, so little work is required to displaying an entire table of data. GridView Control ASP.NET 2.0 shipped with a new server control, Composite DataBoundControl, which considerably cuts down on the amount of code you have to write by hand.

Composite data bound control are referred as composite as these controls use other ASP.NET controls to display bounded data to the user.

These controls inherit from the base class CompositeDataBoundControl Composite DataBound Control <Advertisements>
<Ad>
<ImageUrl>/Images/image1.gif</ImageUrl>
<NavigateUrl>http://www.google.com</NavigateUrl>
<AlternateText>Google Main Site</AlternateText>
<Impressions>50</Impressions>
<Keyword>Searching</Keyword>
</Ad>
<Ad>
<ImageUrl>/Images/Image2.jpg</ImageUrl>
<NavigateUrl>http://www.bing.com</NavigateUrl>
<AlternateText>Bing</AlternateText>
<Impressions>50</Impressions>
<Keyword>Search Engine</Keyword>
</Ad>
</Advertisements> Example:- The AdRotator control is used to display a sequence of advertisement images.

The XML file must begin and end with an <Advertisements> tag.

Inside the <Advertisements> tag there may be several <Ad> tags which defines each advertise. AdRotator The BulletedList control creates a list in bullet format.

The BulletedList control has three display types:
Hyperlink
LinkButton
Text

Property:-
BulletImageUrl
BulletStyle
DisplayMode
FirstBulletNumber Bulleted List The CheckBoxList control is used to create a multi-selection check box group.

The RadioButtonList control is used to create a group of radio buttons & select one of them.

Both Are Having Same Property:-
RepeatColumns
RepeatDirection
Cellpadding
Cellspacing CheckBoxList & RadioButtonList The ListBox control is used to create a single- or multi-selection drop-down list.

The DropDownList control is used to create a drop-down list.

Both Are Having Same Property:-
Rows
SelectionMode
Items etc. ListBox & DropDownList Control Types Of Data-Bound Control <%#Expression %>(delimiters)

Example-1 :
<%#Eval(“Deptno”)%>

Example-2 :
<%#Eval(“Empno”)+”,”+Eval(“Deptno”)%>
<%#Bind(“Fname”)%> Syntax For Data binding Expression Data binding means binding information stored in a data source to controls .

It implies binding any control to almost any kind of data source.

For binding data to control we require DataSource Controls which prepare Data object required for data binding. What is Data Binding? This control can be use to display static data. To populate the control with static data we need to place data between opening and closing <item> tags of the Menu control.

Further you can create a nested structure of <asp:MenuItem> elements within the item elements. Static Data Population This control is also used to display data in hierarchical format.

Data is displayed in menu format.

This control can also be used for navigation; however, in that case it has to be used with SiteMapDataSource control. Menu Figure of Tree View Control Text:- This property is populated with the data that is to be displayed.

Value:- This property is used to store the data that is posted back to the webserver.
 
NavigateUrl:-  A node can be configured either as a selection node or navigation node by setting that property. If property set to an empty string it is selection mode otherwise navigation mode. Property It is a data Bound control that is used to display data in hierarchical format. For example, listing of files, folders and table of conte

This control can also be used for site navigation in combination with SiteMapDataSourceControl.nts in a tree structure. TreeView Figure of Repeater Control Richest Control in ASP.Net.

Uses Template For the Display of Data.

Supports Insert,Update,Delete.

Supports Layout Template, Group Template ListView Control Figure of Form View Control Figure of
Detail View
Control Figure Of Datalist AdRotator Property The predefined elements inside the <Ad> tag The following BulletStyles are available for the BulletedList control:
Circle – Hollow Circle
Disc – most common Bullet
LowerAlpha – Letters
LowerRoman – Roman Numerals
Numbered
Square
UpperAlpha – Letters
UpperRoman – Roman Numerals
CustomImage BulletStyles Common Property Of ListControl List controls include the following controls:=
ListBox,
DropDownList,
CheckBoxList,
RadioButtonList,
BulletedList.

Each of these controls can be data bound to a data source.  Type of List Control They use one field in the data source as the display text and can optionally use a second field as the value of an item.

Items can also be added statically at design-time, and you can mix static items and dynamic items added from a data source List Control Data Bound Controls are the Controls that are bound to Data source.

Data-bound Web server controls are controls that can be bound to a data source control to make it easy to display and modify data in your Web application.  What is Data-Bound Control ? Within the various Templates Fields (e.g., ItemTemplate, EditItemTemplate), you need to specify which data source fields you want to display.

ASP.NET provides a special declarative syntax for specifying data elements, generally referred to as data-binding expressions. Data binding Expression Presented By:- Rupesh Bhavsar Data Bound Control DataBinding:-  It is a collection of MenuItemBinding objects. It defines the binding between a data item and the binding menu item.
 
DataSourceID:- This property contains ID of the data source control with which we are binding our menu control. Properties GridView
DataList
DetailView
FormView
ListView
Repeater

These are the classes that directly inherit from CompositeDataBoundControl. Inherited Classes THANK YOU!!! 1. ListControl
2. Composite DataBound Control
3. Hierarchical DataBound Control Any Queries?????
Full transcript