Awp Superbank
Awp Superbank
Awp Superbank
#college #c-sharp
Unit 1
Default constructor
Parameterized constructor
Copy constructor
Static constructor
Private constructor
What is a constructor?
Default Constructor
using System;
language-cs
namespace DefaultConstructor_Demo
public Customer()
class Program
custormer.firstName = "Farhan";
custormer.lastName = "Ahmed";
Console.ReadLine();
Parameter Constructor
Copy Constructor
using System;
language-cs
namespace CopyConstructor_Demo
public Employee()
// Copy constructor.
firstName = employee.firstName;
lastName = employee.lastName;
position = employee.position;
salary = employee.salary;
class Program
emp1.firstName = Convert.ToString(Console.ReadLine());
emp1.lastName = Convert.ToString(Console.ReadLine());
emp1.position = Convert.ToString(Console.ReadLine());
emp1.salary = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Position:" + emp1.position);
Console.WriteLine("Salary:" + emp1.salary);
Static Constructor
using System;
language-cs
namespace StaticConstructor_Demo
firstName = FirstName;
lastName = LastName;
static Customer()
discount = 10+"%";
Console.WriteLine("Discount:{0}",discount + "\n");
class Program
c1.CustomerDetails();
c2.CustomerDetails();
Console.ReadLine();
private constructor
A private constructor is a special instance constructor. It
is generally used in classes that contain static members only. If a class has
one or more private constructors and no public constructors, other classes
(except nested classes) cannot create instances of this class. The use of
private constructor is to serve singleton classes. A singleton class is one
which limits the number of objects created to one. Using private constructor
we can ensure that no more than one object can be created at a time
One use of private constructor is when we have the only static member.
It provides the implementation of singleton class pattern.
Once we provide constructor (private/public/any) the compiler will not
add the no parameter public constructor to any class.
using System;
language-cs
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PrivateConstructor_Demo
private Candidate()
return ++CandidateVisitedForInterview;
class Program
Candidate.CandidateVisitedForInterview = 20;
Candidate.CountCandidate();
Console.WriteLine("Interviewed candidates: {0}",
Candidate.CandidateVisitedForInterview);
Console.ReadLine();
C# Array Types
There are 3 types of arrays in C# programming:
example
using System;
language-cs
public class ArrayExample
arr[2] = 20;
arr[4] = 30;
//traversing array
Console.WriteLine(arr[i]);
C# - Multidimensional Arrays
C# supports multidimensional arrays up to 32 dimensions. The
multidimensional array can be declared by adding commas in the square
brackets. For example, declares two-dimensional array, [, ,] declares three-
dimensional array, , , , declares four-dimensional array, and so on. So, in a
multidimensional array, no of commas = No of Dimensions - 1.
language-cs
int[,] arr2d; // two-dimensional array
example
language-cs
int[,] arr2d = new int[3,2]{
{1, 2},
{3, 4},
{5, 6}
};
A jagged array is initialized with two square brackets [][]. The first bracket
specifies the size of an array, and the second bracket specifies the
dimensions of the array which is going to be stored.
Example
Memory representation
Explain inheritance with example
single inheritance
multiple inheritance (only works using interfaces)
Important terminology:
Syntax:
using System;
namespace ConsoleApplication1 {
// Base class
class GFG {
// data members
this.name = name;
this.subject = subject;
public GeeksforGeeks()
Console.WriteLine("GeeksforGeeks");
// Driver class
class Sudo {
// Main Method
g.readers("Kirti", "C#");
Types of Inheritance in C#
using System;
language-cs
namespace InheritanceApplication {
class Shape {
width = w;
height = h;
// Derived class
class RectangleTester {
int area;
Rect.setWidth(5);
Rect.setHeight(7);
area = Rect.getArea();
Console.ReadKey();
Explain everything on
class
functions
namespace
Declaration of class
Generally, a class declaration contains only a keyword class, followed by
an identifier(name) of the class. But there are some optional attributes that
can be used with class declaration according to the application requirement.
In general, class declarations can include these components, in order:
Constructors in class are used for initializing new objects. Fields are
variables that provide the state of the class and its objects, and methods are
used to implement the behavior of the class and its objects.
// field variable
public int a, b;
Example:
As we declare variables like (type name;). This notifies the compiler that we
will use the name to refer to data whose type is type. With a primitive
variable, this declaration also reserves the proper amount of memory for the
variable. So for reference variable, the type must be strictly a concrete class
name.
Dog tuffy;
language-cs
Initializing an object
The new operator instantiates a class by allocating memory for a new object
and returning a reference to that memory. The new operator also invokes
the class constructor.
Example:
using System;
// Class Declaration
// Instance Variables
String name;
String breed;
int age;
String color;
this.name = name;
this.breed = breed;
this.age = age;
this.color = color;
// Property 1
return name;
// Property 2
return breed;
// Property 3
return age;
// Property 4
return color;
// Method 1
// Main Method
// Creating object
Console.WriteLine(tuffy.ToString());
C# Function
Function is a block of code that has a signature. Function is used to execute
statements specified in the code block. A function consists of the following
components:
Return type: It is used to specify the data type of function return value.
C# Function Syntax
using System;
language-cs
namespace FunctionExample
class Program
// No return statement
class Program
// No return statement
C# | Namespaces
Namespaces are used to organize the classes. It helps to control the scope
of methods and classes in larger .Net programming projects. In simpler
words you can say that it provides a way to keep one set of names(like class
names) different from other sets of names. The biggest advantage of using
namespace is that the class names which are declared in one namespace
will not clash with the same class names declared in another namespace. It
is also referred as named group of classes having common features. The
members of a namespace can be namespaces, interfaces, structures, and
delegates.
Example
namespace name1
language-cs
{
class C1
// class code
Example Code
// namespace declaration
namespace first {
// i.e. class
class Geeks_1
System.Console.WriteLine("Hello Geeks!");
class Geeks_1
} */
// Class declaration
class Geeks_2
// Main Method
first.Geeks_1.display();
Unit 2
Write note on AdRotator and calendar with rich controls
The AdRotator control randomly selects banner graphics from a list, which is
specified in an external XML schedule file. This external XML schedule file is
called the advertisement file.
The AdRotator control allows you to specify the advertisement file and the
type of window that the link should follow in the AdvertisementFile and the
Target property respectively.
<asp:AdRotator language-cs
runat = "server" AdvertisementFile = "adfile.xml"
Target = "_blank" />
XML is not a language in itself, like HTML, but a set of rules for creating new
markup languages. It is a meta-markup language. It allows developers to
create custom tag sets for special uses. It structures, stores, and transports
the information.
<BOOK>
language-cs
<NAME> Learn XML </NAME>
<PRICE> $30.00</PRICE>
</BOOK>
Like all XML files, the advertisement file needs to be a structured text file
with well-defined tags delineating the data. There are the following standard
XML elements that are commonly used in the advertisement file:
Example
</div>
</form>
The Calendar is complex, powerful Web server control that you can use
to add a calendar feature to your web page. We can use Calendar
control to display any date between 0 A.D. and 9999 A.D.
The Calendar control can be used to select a single date or multiple dates.
The SelectionMode property is used for this.
Server Controls are the tags that are understood by the server. There are
basically three types of server controls.
These controls are grouped together in the Visual Studio Toolbox in the
HTML Control tab. The markup of the controls is similar to the HTML
control.
These controls are basically the original HTML controls but enhanced to
enable server side processing.
HTML elements in ASP. NET files are, by default, treated as text. To
make these elements programmable, add a runat="server" attribute to
the HTML element. This attribute indicates that the element should be
treated as a server control.
Note:
All HTML server controls must be within a form tag with the runat="server"
attribute. The runat="server" attribute indicates that the form should be
processed on the server. It also indicates that the enclosed controls can be
accessed by server scripts.
Web server controls are special ASP. NET tags understood by the
server.
Like HTML server controls, Web server controls are also created on the
server and they require a runat="server" attribute to work.
However, Web server controls do not necessarily map to any existing
HTML elements and they may represent more complex elements.
Mostly all Web Server controls inherit from a common base class,
namely the WebControl class defined in
the System.Web.UI.WebControls namespace.
After you create a web form, you should make sure that mandatory
fields of the form elements such as login name and password are not
left blank; data inserted is correct and is within the specified range.
Validation is the method of scrutinizing (observing) that the user has
entered the correct values in input fields.
A Validation server control is used to validate the data of input control. If
the data does not pass validation, it will display an error message to the
user.
In ASP. NET you can use ASP. NET Validation Controls while creating the
form and specify what ASP. NET Validation Controls you want to use
and to which server control you want to bind this.
Validation Controls are derived from a common base class and share a
common set of properties and methods. You just have to drag and drop
the ASP. NET Validation Control in the web form and write one line of
code to describe its functionality.
This reduces the developer time from writing JavaScript for each type of
validation. Moreover, through ASP. NET Validation Controls if any invalid
data is entered the browser itself detects the error on the client-side
and displays the error without requesting the server. This is another
advantage because it reduces the server load.
Web Forms are web pages built on the ASP.NET Technology. It executes on
the server and generates output to the browser. It is compatible to any
browser to any language supported by .NET common language runtime. It is
flexible and allows us to create and add custom controls.
Web Forms are made up of two components: the visual portion (the ASPX
file), and the code behind the form, which resides in a separate class file.
Server Controls
The following table contains the server-side controls for the Web Forms.
HTML Controls
These controls render by the browser. We can also make HTML controls as
server control. we will discuss about this in further our tutorial.
RequiredFieldValidator
RangeValidator
CompareValidator
RegularExpressionValidator
CustomValidator
ValidationSummary
RequiredFieldValidator Control
The RequiredFieldValidator control ensures that the required field is not
empty. It is generally tied to a text box to force input into the text box.
<asp:RequiredFieldValidator ID="rfvcandidate"
language-cs
runat="server" ControlToValidate ="ddlcandidate"
</asp:RequiredFieldValidator>
RangeValidator Control
The RangeValidator control verifies that the input value falls within a
predetermined range.
MinimumValue="6" Type="Integer">
</asp:RangeValidator>
CompareValidator Control
The CompareValidator control compares a value in one control with a fixed
value or a value in another control.
</asp:CompareValidator>
RegularExpressionValidator
The RegularExpressionValidator allows validating the input text by matching
against a pattern of a regular expression. The regular expression is set in the
ValidationExpression property.
ValidationExpression="string" ValidationGroup="string">
</asp:RegularExpressionValidator>
CustomValidator
The CustomValidator control allows writing application specific custom
validation routines for both the client side and the server side validation.
</asp:CustomValidator>
ValidationSummary
The ValidationSummary control does not perform any validation but shows a
summary of all errors in the page. The summary displays the values of the
ErrorMessage property of all validation controls that failed validation.
The following two mutually inclusive properties list out the error message:
Unit 3
Explain exception handling mechanism with proper syntax and example
Exception Handling in C# is a process to handle runtime errors. We perform
exception handling so that normal flow of the application can be maintained
even after runtime errors.
try
catch
finally, and
throw
try {
language-cs
// statements causing exception
} catch( ExceptionName e1 ) {
} catch( ExceptionName e2 ) {
} catch( ExceptionName eN ) {
} finally {
// statements to be executed
There are two types of State management in ASP net. They are :
Server-side
Client-side
Server-Side
Session
Application
Cache
Client-Side
Cookies
Viewstate
Control state
Query String
Hidden Field
Session
An important technique to maintain state. It is used to store identity and
information; information is stored in the server using Sessionid.
Session["UserName"] = txtName.Text;
Response.Redirect("Home.aspx");
Session Event
Two types -
Session starts - Raised every time a new user requests without a session ID.
Example
Session["Master"] = "~/Master.master";
Session end - Raised everytime the user ends the session or a time out
occurs.
Example
Response.Write("Session_End");
cookies
One of the smallest but important parts of the ASP NET, it is used to store
the session and application information of the user. It can be constant and
temporary and works with browser requests. The server can read these
cookies from the client-side and perform data abstraction.
Persistence - The Persistence cookie works along with Time and Date.
Example
language-cs
Response.Cookies["CookiesName"].Expires = DateTime.Today.AddHours(2);
Example
Global Theme
A Global theme is a theme that is applied to all the web sites on a web
server and includes property settings, and graphics. This theme allows us to
maintain all the websites on the same web server and define the same style
for all the web pages of the web sites.
Skins
A skin file has the file name extension .skin and contains property settings
for individual controls such as Button, Label, TextBox, or Calendar controls.
Control skin settings are like the control markup itself, but contain only the
properties you want to set as part of the theme. For example, the following
is a control skin for a Button control
Themes can define many properties of a control or page, not just style
properties. For example, using themes, you can specify the graphics for a
TreeView control, the template layout of a GridView control, and so on.
Themes do not cascade the way style sheets do. By default, any property
values defined in a theme referenced by a page's Theme property override
the property values declaratively set on a control, unless you explicitly apply
the theme using the StyleSheetTheme property. For more information, see
the Theme Settings Precedence section above.
Only one theme can be applied to each page. You cannot apply multiple
themes to a page, unlike style sheets where multiple style sheets can be
applied.
CSS
following are the selectors present in CSS:
1. Universal Selector:
The universal selector, indicated by an asterisk ( *),
applies to all element in your page.
The universal selector can be used
to set global settings like a font family. The following
rule set changes
the font for all elements in our page to Arial:
*{
language-css
Font-family: Arial;
2. Type Selector:
The type selector enables us to point to an HTML
element of a specific type. With a type
selector all HTML elements of
that type will be styled accordingly.
h1
language-css
{
Color:Green;
3. ID Selector:
Th id selector always prefixed by a hash symbol (#) and
enables us to refer to a single
element in the page. Within an HTML or
ASPX page, we can give an element a unique
ID using the id attribute.
With the ID selector, we can change the behavior for that single
element, for example:
#IntroText
language-css
{
Font-style: italic;
Because we can reuse this ID across multiple pages in our site, you can use
this rule to
quickly change the appearance of an element that use once per
page, but more than once
in our site, for example with the following HTML
code:
<p id= “IntroText”> I am italic because I have right ID </p>
4. Class Selector:
The class selector enables us to style multiple HTNL
elements through the class
attribute. This is handy when we want to give
the same type of formatting to several
unrelated HTML elements. The
following rule changes the text to red and bold for all
HTML elements that
have their class attributes set to highlight:
.Highlight
language-css
{ font-weight:bold; color:Red; }
A master page is an ASP.NET file with the extension .master (for example,
MySite.master) with a predefined layout that can include static text, HTML
elements, and server controls. The master page is identified by a special @
Master directive that replaces the @ Page directive that is used for ordinary
.aspx pages. The directive looks like the following.
Master Page
<% @ Master Language="VB" %>
language-cs
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<head runat="server">
</head>
<body>
<table>
<tr>
<td><asp:contentplaceholder id="Main"
runat="server" />
</td>
<td>
<asp:contentplaceholder
id="Footer" runat="server" />
</td>
</tr>
</table>
</form>
</body>
</html>
Content Pages
You define the content for the master page's placeholder controls by
creating individual content pages, which are ASP.NET pages (.aspx files and,
optionally, code-behind files) that are bound to a specific master page.
language-vb
<%@ Page Language="VB" MasterPageFile="~/MasterPages/Master1.master"
Title="Content Page" %>
Unit 4
\ Explain details about DataReader with example
A data reader provides an easy way for the programmer to read data from a
database as
if it were coming from a stream. The DataReader is the solution
for forward streaming data
through ADO.NET. The data reader is also called
a firehose cursor or forward read-only cursor
because it moves forward
through the data. The data reader not only allows you to move
forward
through each record of database, but it also enables you to parse the data
from each
column. The DataReader class represents a data reader in
ADO.NET.
Similar to other ADO.NET objects, each data provider has a data
reader class for
example; OleDbDataReader is the data reader class for
OleDb data providers. Similarly,
SqlDataReader and ODBC DataReader are
data reader classes for SQL and ODBC data
providers, respectively.
The
IDataReader interface defines the functionally of a data reader and works as
the
base class for all data provider-specific data reader classes such as
OleDataReader.
SqlDataReader, and OdbcDataReader. Figure 5-36 shows
some of the classes that implement
IDbDataReader.
language-cs
SqlCommand myCMD = new SqlCommand("SELECT CategoryID, CategoryName
FROM
nwindConn.Open();
do {
Console.WriteLine("\t{0}\t{1}", myReader.GetName(0),
myReader.GetName(1));
der.GetString(1)); }
while (myReader.NextResult());
myReader.Close();
nwindConn.Close();
➢ PagerStyle :- It configures the appearance of the row with the page links,
if we’ve enabled
paging (set AllowPaging to true).
➢ BorderStyle :- It
configures the appearance of border style of the Web server control.
➢
AlternatingRowStyle :- It configures the appearance of TableItemStyle object
that enables
us to set the appearance of alternating data rows in a GridView
control.
➢ SelectedValue :- Gets the data key value of the selected row in a
GridView control.
language-cs
string constr = ConfigurationManager.ConnectionStrings[“constr”]
ConnectionString;
cmd.Connection = con;
Sda.fill(dt);
GridView1.DataSource = dt;
GridVie1.dataBind();
follows:
A provider is
software that provides a standardized interface between a service and a
data
source. ASP.NET providers are as follows:
✓ Membership
✓ Role
Management
✓ Sitemap
✓ Profile
✓ Session state etc.
At the top of the
diagram you see the ASP.NET 4 web sites and web application that
represent the web sites that you build. These web sites can contain controls
like the login
controls that it turns can talk to the ASP.NET application
services such as membership and
profile. To create a flexible solution, these
services don’t talk to an underlying data source
directly, but instead talk to a
configured provider.
A provider is an interchangeable piece of software that
is designed for a specific task.
For example, in the case of the work with
users in the underlying data store. You can configure
different providers for
some application service depending on your need.
Data Provider model :-
ADO.NET has a set of classes that are used to connect to a specific
data
source. Each set of data interaction classes is called an ADO. NET data
provider.
ADO.NET data provider includes SQL Server Data Provider, Oracle
Data Provider,
OLEDB Data Provider and ODBC Data Provider. The classes
used to connect to a specific
data source includes Connection, Command,
DataReader and DataAdapter.
• This is similar to the way that built-in ASP.NET collections such as Session,
Application,
and Cache work.
• With a dictionary collection, we retrieve the item we want by using its key.
• Generally, ordinary collections make sense when we need to work with all
the items at
once, while dictionary collections make sense when we
frequently retrieve a single specific
item.
• We can use two basic dictionary-
style collections in .NET.
• The Hashtable collection allows us to store any
type of object and use any type of object
for the key values.
• The
Dictionary collection uses generics to provide the same “locking in” behavior
as the
List collection.
• We choose the item type and the key type upfront to
prevent errors and reduce the amount
of casting code we need to write.
if (!this.IsPostBack)
fruit.Add(1, "Kiwi");
fruit.Add(2, "Pear");
fruit.Add(3, "Mango");
fruit.Add(4, "Blueberry");
fruit.Add(5, "Apricot");
fruit.Add(6, "Banana");
fruit.Add(7, "Peach");
fruit.Add(8, "Plum");
MyListBox.DataTextField = "Value";
this.DataBind();
// Activate the binding.
1. Like DetailsView, FormView also displays a single record from the data
source at a
time.
2. Both show a single record at a time but can include optional pager
buttons that let us
step through a series of records (showing one per
page).
3. Both controls can be used to display, edit, insert and delete database
records but one at
a time. And both support templates, but the
FormView requires them.
4. Both have paging feature and hence support backward and forward
traversal.
ItemTemplate of FormView :-
• ItemTemplate is used to display
the data from data the source in ReadOnly mode.
• The controls
included in an ItemTemplate are controls that only display data, such as
a
Label control.
• The template can also contain command buttons to
change the FormView control’s
mode to insert or edit, or to delete the
current record.
• The ItemTemplate template can include Link Button
controls that change the mode of
the FormView control based on the
Command Name value.
• A CommandName value of New puts the
record into insert mode and loads the
InsertItemTemplate, which allows
the user to enter values for a new record.
• We can add a button with a
CommandName value of Edit to the ItemTemplate template
to put the
FormView control into edit mode.
• A button with a CommandName
value of Delete can be added to the ItemTemplate
template to allow
users to delete the current record from the data source.
Following are some points which shows the difference between FormView
and
DetailsView:
• Like DetailView, FormView also displays a single record
from the data source at a time.
• Both controls can be used to display, edit,
insert and delete database records but one at a
time. Both have paging
features and hence support backward and forward traversal.
• FormView is
a new data-bound control that is nothing but a templated version of
detailsView control.
• The major difference between DetailsView and
FormView is, here user need to define the
rendering template for each item.
• The FormView control provides more formatting and layout options than
DetailsView.
• The DetailsView control can uses elements or elements
to
display bound data whereas FormView can use only templates to display
bound data.
• The FormView control renders all fields in a single table row
whereas the DetailsView
control displays each field as a table row.
• When
compare to DetailsView, the FormView control provides more control over
the
layout.
A FormView control after a data source has been assigned
Unit 5
What is XML? What are its basic characteristics?
XML is short for Extensible Markup Language. It is a very widely used format
for exchanging
data, mainly because it's easy readable for both humans and
machines. If we have ever written
a website in HTML, XML will look very
familiar to us, as it's basically a stricter version of
HTML. XML is made up of
tags, attributes and values.
Following are basic characteristics of XML :-
•
XML elements are composed of a start tag (like ) and an end tag (like ).
Content is placed between the start and end tags. If we include a start tag,
we must also
include a corresponding end tag. The only other option is to
combine the two by creating
an empty element, which includes a forward
slash at the end and has no content (like
). This is similar to the syntax for
ASP.NET controls.
• We can use only valid characters in the content for an element. We can’t
enter special
characters, such as the angle brackets (< >) and the
ampersand (&), as content. Instead, we
have to use the entity equivalents
(such as < and > for angle brackets, and & for
the ampersand). These
equivalents will be automatically converted to the original
characters when
we read them into our program with the appropriate .NET classes.
XML REAder
XmlTextReader:
Provides forward-only, read-only access to a
stream of XML data. The current node
refers to the node on which the
reader is positioned. The reader is advanced using any of the
read methods
and properties reflect the value of the current node. The syntax to declare
an
object of this class is as follows:
XmlTextReader reader = new
XmlTextReader (“XML1.xml”);
XmlTextReader provides the following
functionality:
MUQuetionPapers.com
Example:
}
XmlTextWriter:
XmlTextWriter:
Break;
One of the simplest ways to create or read any XML document is to
use the basic
XmlTestWriter and XmlTextReader classes. You create the
entire XML document by calling
the methods of the XmlTextWriter, in the
right order. To start a document, you always begin
by calling
WriteStartDocument(). To end it, you call WriteEndDocument().
You write the
elements you need, in three steps. First, you write the start tag by calling
WriteStartElement(). Then you write attributes, elements, and text content
inside. Finally, you
write the and tag by calling WriteEndElement().
The
methods you see always work with the current element, so if you call
WriteAttributeString() and follow it up with a call to WriteAttributeString(),
you are adding an
attribute to that element. Similarly, if you use
WriteString(), you insert text content inside the
current element, and if you
use WriteStartelement() again, you write another element, nested
inside the
current element.
Authorization:
⎯ Authentication and Authorization are two interconnected
security concepts.
⎯ Authentication is a process of identifying a user and
authorization is the
process of checking whether authenticated user has
access to the resources
they requested.
⎯ There are two forms of
authorization available in ASP.NET:
o FileAuthorization: it is performed by the
FileAuthorization Module.
It uses the access control list of the .aspx file to
resolve whether a
user should have access to the file. ACL permissions are
confirmed
for the users windows identity.
o UrlAuthorization: In the
Web.config file you can specify the
authorization rules for various directories
or files using the
element.
1. Forms authentication
2. Windows authentication
3. Forms Authentication :-
...
<system.web>
...
</system.web>
</configuration>
Windows Authentication :-
• In Windows authentication, the web server
forces every user to log in as a Windows
user.
• This system required that all
user have windows user account on the server.
• With Windows
authentication, the web server takes care of the authentication
process.
•
ASP.NET simply makes this identity available to our code for our security
checking.
• When we use Windows authentication, we force users to log into
IIS before they’re
allowed to access secure content in our website.
• The
user login information can be transmitted in several ways, but the end result
is
that the user is authenticated using a local Windows account.
To
implement Windows-based security with known users, we need to follow
three steps:
<system.web>
...
</system.web>
</configuration>
• At the moment, there’s only one authorization rule, which uses the
question mark to refuse
all anonymous users. This step is critical for
Windows authentication (as it is for forms
authentication). Without this step,
the user will never be forced to log in.
• We can also add and elements to
specifically allow or restrict users from
specific files or directories. Unlike
with forms authentication, we need to specify the name
of the server or
domain where the account exists.
Example –
3. Form validation.
5. Asynchronous calls can be made this reduces the time for data arrival.
Disadvantages:
6. Open-source.
8. For security reason, you can only access information from the web host
that serve
pages. Fetching information from other servers is not possible with Ajax.
The ASP.NET AJAX control toolkit is a joint project between Microsoft and
the
ASP.NET community. It contains of dozens of controls that use the
ASP.NET AJAX libraries
to create sophisticated effects. The ASP.NET AJAX
control toolkit is completely free. It
includes full source code, which helpful if
you are ambitious enough to want to create your
own custom controls that
use ASP.NET AJAX features.
It uses extenders that enhance the standard AP.NET web controls. That
way, you don’t
have to replace all the controls on your web pages instead,
you simply plug in the new bits of
functionality that your need. Installing the
ASP.NET AJAX control toolkit. You can download
the ASP.NET AJAX control
toolkit from http://ajaxcontroltoolkit.codeplex.com. Click the
download tab,
and find the toolkit for the latest version of .NET. After you downloaded this
ZIP file, you can extract the files it contains to a more permeant location on
your hard drive.
(AccordionControl.Elements, AccordionControlElement.Elements).
• Items
and groups can display images and text in their headers
(AccordionControlElementBase.Image,
AccordionControlElementBase.ImageIndex,
AccordionControlElementBase.Text)
• Items can display custom controls in
an expandable area below their headers
(AccordionControlElementBase.ContentContainer).
• Load items' content
dynamically
(AccordionControl.HasContentContainer,
AccordionControl.GetContentContainer).
• One or multiple elements can be
expanded simultaneously
(AccordionControl.ExpandElementMode)
• Context buttons in item and
group headers
(AccordionControl.ItemContextButtons, AccordionControl.GroupContextButt
ons and AccordionControl.ContextButtonCustomize).
• Custom controls in
item headers (AccordionControlElementBase.HeaderControl).
• Item
selection feature (AccordionControl.AllowItemSelection) - Allows you to
highlight a clicked item.
• Item and group expanding/collapsing animation
(AccordionControl.AnimationType)
• The built-in search box
(AccordionControl.ShowFilterControl) - Allows you to filter
items based on
the search text.
• Support for an external search box (SearchControl).
Gets
or sets the default action description of the control for use by accessibility
client
applications. Inherited from Control.