Server Controls
Server Controls
net Controls
HtmlControls are just programmable HTML tags. By default these tags are literal text and you can't
reference them with server side code. To "see" any HTML tag with your ASP.NET server side code
you need to add runat="server" and some value to ID parameter. For example, to work with
<textarea> HTML tag with server side code, you can use HTML code like this:
Asp.net provides a built in set of controls that are collectively referred an Asp.net
web server controls.
Web server controls includes form controls such as button, label, textbox along with
special –purpose like grid, calendar, ad rotator and etc.
1) All Asp.net controls has two mandatory attributes like runat=server and Id.
2) These controls provide a rich object model that uses familiar oo techniques
along with type safety.
3) The controls automatically detect the browser identifying its capabilities to
render appropriate markup.
4) It support themes that guarantee consistent look and feel for controls
throughout the site.
5) <td class="style3">
6) <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
7) asp is a prefix for server control
Data Controls : A data source control interacts with the data-bound controls and hides the complex data
binding processes. These are the tools that provide data to the data bound controls and support execution of
operations like insertions, deletions, sorting and updates. There are two types of ASP.NET data controls
Data Source controls, which allow you to set properties for connections to database or XML
data sources, and Data controls, which allow you to display data from data sources specified
in Data Source controls.
SqlDataSource control
XmlDataSource control
SiteMapDataSource control
Data Controls
DataList control
DetailsView control
FormView control
GridView control
Login Controls: The ASP.NET login controls provide a robust login solution for ASP.NET
Web applications without requiring programming. By default, login controls integrate with
ASP.NET membership and forms authentication to help automate user authentication for a
Web site
The Login control displays a user interface for user authentication. The Login control
contains text boxes for the user name and password and a check box that allows users to
indicate whether they want the server to store their identity using ASP.NET membership and
automatically be authenticated the next time they visit the site.
TreeView control
Menu Control
SiteMapPath control
Validation controls: An important aspect of creating ASP.NET Web pages for user input
is to be able to check that the information users enter is valid. ASP.NET provides a set of
validation controls that provide an easy-to-use but powerful way to check for errors and, if
necessary, display messages to the user..
RequiredFieldValidator:
Use the RequiredFieldValidator control to make an input control a mandatory field.
The input control fails validation if the value it contains does not change from its
initial value when validation is performed. This prevents the user from leaving the
associated input control unchanged. By default, the initial value is an empty string
(""), which indicates that a value must be entered in the input control for it to pass
validation.
RangeValidator
The RangeValidator does exactly what the name implies; it makes sure that the user input
is within a specified range. You can use it to validate both numbers, strings and dates, which
can make it useful in a bunch of cases.
CompareValidator
Evaluates the value of an input control against a constant value or the value of
another input control to determine whether the two values match the
relationship specified by a comparison operator (less than, equal to, greater
than, and so on
RegularExpressionValidator
Both server- and client-side validation are performed unless the browser
does not support client-side validation or the EnableClientScript property is
set to false.
The validation will not fail if the input control is empty. Use the
RequiredFieldValidator control to make the field required
CustomValidator
If existing ASP.NET validation controls do not suit your needs, you can define a
custom server-side validation function and call it using the CustomValidator
control. You can also add client-side validation to check user input before the
page is submitted by writing a function in ECMAScript (JavaScript) that duplicates
the logic of the server-side method.
ValidationSummary
Label
TextBox
Button
Radio button
Check box
Image
Hyperlink
List Controls: The List controls enable us to display simple lists of options. For
example, we can use the RadioButtonList control to display a group of radio
buttons, or the BulletedList control to display a list of links. In this series of article
we will also discuss on DropDownList, RadioButtonList, ListBox, CheckBoxList, and
BulletedList controls too. We will also discuss how to bind them to a data source
such as a database tables. .
The DropDownList,
The CheckBoxList,
The RadioButtonList, and
The ListBox
Rich controls: It provides an object model that has a complex HTML
representation. A typical rich control can often be programmed as a single object
but renders itself with a complex sequence.
Adrotator
Calender Control
MultiView