Professional Documents
Culture Documents
RequiredFieldValidator
Description
Ensures that the user does not skip an entry.
Comparison CompareValidator
to a value
Range
checking
RangeValidator
Pattern
matching
Userdefined
CustomValidator
2.
user input on Server Side because you can protect against the malicious users, who can
easily bypass your Client Side scripting language and submit dangerous input to the
server.
Client Side Validation:In the Client Side Validation you can provide a better user
experience by responding quickly at the browser level. When you perform a Client Side
Validation, all the user inputs validated in the user's browser itself. Client Side validation
does not require a round trip to the server, so the network traffic which will help your
server perform better. This type of validation is done on the browser side using script
languages such as JavaScript, VBScript or HTML5 attributes.
4. What is the difference between HTML and Web Server Controls?
HTML controls:HTML controls are the native browser elements and they are part of
HTML language. These are client side controls which is accessible only in the HTML
page, so it will improve the performance of the web page. HTML controls on an
ASP.NET Web page are not available to the web server.
HTML Server controls:You can add the attribute runat="server" to any HTML
control, such cases it will be an HTML server control. These controls map directly to html
tags and without runat="server" it cannot access the control in code behind.
Web Server Controls or ASP.NET controls:Web Server Controls are group of
controls derived directly from the System.Web.UI.WebControls base class. They are
executed on the server side and output HTML sent back to the client browser. These
controls are programmable and reusable that can perform function as the ordinary HTML
controls. Web Server Controls can detect the target browser's capabilities and render
themselves accordingly.
5. What are the various session state management options provided by ASP.NET?
The stateless nature of HTTP makes the inclusion of a mechanism to save application
state between user requests a mustthe server must be able to identify the same user
across multiple requests. Classic ASP included aSession object that accomplished this, but
unfortunately, that implementation has two main weaknesses.
First, the 120-bit session ID used to identify the session is always stored as a cookie
on the browser. So, if the security policy of a user's employer disallows cookies,
the Session object cannot be populated.
Second, the data associated with the session and accessed through the session ID is
stored on the Web server that processed the initial request and started the session. As a
result, the session data cant be shared in a web farm scenario where multiple web servers
are processing requests from multiple clients.
The ASP.NET session implementation addresses both of these weaknesses by
allowing for "cookieless" sessions and off-server storage of session data.
Session are the server side method of managing the state of an application i.e. all the
web applications' state related info will be stored on server side if we use this technique.
The benefit of having this technique is that since we are keeping all the state related
information on server, the request and response becomes lightweight. Also, the chances of
someone intercepting or changing this data is also reduced. But this technique does
involve more resource usage on the server.
The advantages of using Session State are
Better security
Reduced bandwidth
The disadvantages of using Session state are
2
6. What is ViewState?
View state is the method that the ASP.NET page framework uses to preserve
page and control values between round trips. When the HTML markup for the page is
rendered, the current state of the page and values that must be retained during
postback are serialized into base64-encoded strings. This information is then put into
the view state hidden field or fields.
A Web application is stateless. A new instance of the Web page class is created
every time that the page is requested from the server. This would ordinarily mean that
all information in the page and in its controls would be lost with each round trip. For
example, by default if a user enters information into a text box on an HTML Web
page, that information is sent to the server. However, it is not returned to the browser
in the response.
To overcome this intrinsic limitation of Web programming, the ASP.NET page
framework includes several state-management features to preserve page and control
values between round trips to the Web server. One of these features is view state.
7.
UnLoad - The UnLoad phase is the last phase of the page life cycle. It raises the
UnLoad event for all controls recursively and lastly for the page itself. Final cleanup is
done and all resources and references, such as database connections, are freed. This event
can be handled by modifying the OnUnLoad method or creating a Page_UnLoad handler.
8. What is caching?
One of the most important factors in building high-performance, scalable Web
applications is the ability to store items, whether data objects, pages, or parts of a page, in
memory the initial time they are requested. You can cache, or store, these items on the
Web server or other software in the request stream, such as the proxy server or browser.
This allows you to avoid recreating information that satisfied a previous request,
particularly information that demands significant processor time or other resources.
ASP.NET caching allows you to use a number of techniques to store page output or
application data across HTTP requests and reuse it.
ASP.NET provides two types of caching that you can use to create high-performance
Web applications. The first is output caching, which allows you to store dynamic page
and user control responses on any HTTP 1.1 cache-capable device in the output stream,
from the originating server to the requesting browser. On subsequent requests, the page or
user control code is not executed; the cached output is used to satisfy the request. The
second type of caching is application data caching, which you can use to
programmatically store arbitrary objects, such as application data, in server memory so
that your application can save the time and resources it takes to recreate them.
9. What are the main features and benefits of Silverlight?
The following are the features of SilverLight:
Built in CLR engine is available for delivering a super high performance
execution environment for the browser.
Includes rich framework of built-in class library for using with browser-based
applications.
Supports WPF UI programming model.
Provides a managed HTML DOM API which is used for HTML enabled programs
of a browser using .NET technology.
Silverlight supports PHP or Linux environment. Hence does not require ASP.NET.
Permits limited access to file system for applications. An OS native file dialog box
can be used for using any file.
The following are the benefits of Silverlight:
Supports highest quality videos
Supports cross-platform and cross-browser applications
Features are available for developers with Visual Studio for developing
applications very quickly.
Most inexpensive way for video streaming over internet at the best possible
quality.
Supports third party languages such as Ruby, Python
Supports remote debugging.
Provides copy protection.
10. What is XAML?
4
XAP file is a ZIP file. It contains many files needed to run Silverlight application at
the client browser. There are many files contained in a XAP file. It includes an XAML
file and DLL files referenced by the software.
5
Description
Canvas
Defines an area within which you can explicitly position child elements by
coordinates relative to the Canvas area.
Grid
StackPanel Arranges child elements into a single line that can be oriented horizontally or
vertically.
6