Sunteți pe pagina 1din 8

Asp,Asp.

Net and Page Life Cycle


1)What is Web Page?
Asnwer:
A web page or webpage is a document commonly written in HyperText Markup Langua
ge (HTML)
that is accessible through the Internet or other network using a browser. A web
page is
accessed by entering a URL addresses and may contain text, graphics, and hyperl
inks to
other web pages and files. The page you're reading now is an example of a web p
age.
================================================================================
=======
2)When was the first web page created?
Answer:
The first web page was created at CERN by Tim Berners-Lee and put online
August 6, 1991.
================================================================================
========
3)What is the difference between a website and web page?
A website refers to a central location that contains more than one web page. Fo
r example,
Computer Hope is considered a website, which contains thousands of different pa
ges.
However, this page you're reading now is considered a web page on Computer Hope
.
================================================================================
=========
4)what are the different types of Frameworks to develop web application?
Answer:
1)php
2)Jsp
3).Net
4)SalesForce e.t.c......
================================================================================
=========
5)what are the different type of technology used in .net to develop web applicat
ion?
Answer:
1)Asp
2)Asp.Net
3)MVC
================================================================================
=========
6) What is ASP/ Classis ASP?
Answer:
ASP stands for Active Server Pages. ASP is a scripting language, which is inter
preted
instead of compilation, in which we can use sub routines. The ASP file normally
contains
HTML tags, along with scripts, which is interpreted on the server (The code sur
rounded by
the ASP delimiters <%%>). The ASP Code can have expressions, statements, proced
ures, or
operators valid for the scripting language you prefer to use (like VB script, J
script etc.
================================================================================
==========
7) What are the advantages of using ASP?
Answer:
HTML is used only to create static web pages (which displays information) With
the use of
ASP one can create dynamic web pages,where client can communicate with the web
server and
vice versa. Thus using ASP interactive webpages can be created.
================================================================================
==========
8)What is ASP.NET?
Answer:
ASP.NET is a specification developed by Microsoft to create dynamic Web applica
tions, Web
sites, and Web services. It is a part of .NET Framework. You can create ASP.NET
applications
in most of the .NET compatible languages, such as Visual Basic, C#, and J#. The
ASP.NET
compiles the Web pages and provides much better performance than scripting lang
uages,
such as VBScript. The Web Forms support to create powerful forms-based Web page
s. You
can use ASP.NET Web server controls to create interactive Web applications. Wit
h the
help of Web server controls, you can easily create a Web application
================================================================================
=========
9)what is Maindifferences between classic asp and asp.net?
Answer:
The basic difference between ASP and ASP.NET is that ASP is interpreted;
whereas, ASP.NET is compiled. This implies that since ASP uses Vb-script; there
fore, when
an ASP page is executed, it is interpreted. On the other hand, ASP.NET uses .NE
Tlanguages,
such as C# and VB.NET, which are compiled to Microsoft Intermediate Language(MS
IL).
================================================================================
=========
10)What are different of Model to Write the code in Asp.Net?
Answer:
1)CodeBehind Model
2)InLine Model
================================================================================
=========
11)What is Difference Between CodeBehind and InLine model?
Answer:
Code Behind
Code Behind refers to the code for an ASP.NET Web page that is written in a sep
arate
class file that can have the extension of .aspx.cs or .aspx.vb depending on the
language
used. Here the code is compiled into a separate class from which the .aspx file
derives.
You can write the code in a separate .cs or .vb code file
for each .aspx page. One major point of Code Behind is that the code for all th
e Web pages
is compiled into a DLL file that allows the web pages to be hosted free from an
y Inline
Server Code.
Inline Code
Inline Code refers to the code that is written inside an ASP.NET Web Page that
has an
extension of .aspx. It allows the code to be written along with the HTML sourc
e code
using a <Script> tag. It's major point is that since it's physically in the .a
spx file
it's deployed with the Web Form page whenever the Web Page is deployed.
================================================================================
=========
12)What are the different stages in Page Life Cycle ?
Answer:
Following are the different stages in Page Life Cycle

1)Start
2)Initialization
3)Load
4)Validation and Post back
5)Rendering
6)UnLoad
================================================================================
=========
13)What is http header?
Answer:
HTTP headers expose a great deal of information about your client as well as th
e server you
are working, the application you are designing, as well as the environment you
are in
(SSL, etc.).The functionality for this is held in "Request.ServerVariables", so
you only
need to access that.
================================================================================
=========
14)How to handle Error in ASP?
Answer:
Using On Error Resume Next
================================================================================
========
15)What type of code, client-side or server-side, is found in a code-behind file
of a Web page?
Answer:
A code-behind file contains the server-side code, which means that the code con
tained in a
code-behind file is executed at the server.
================================================================================
========
16)What events are fired when a page loads?
Answer:
The following events fire when a page loads:
Init()- Fires when the page is initializing.
LoadViewState()- Fires when the view state is loading.
LoadPostData()- Fires when the postback data is processing.
Load()- Fires when the page is loading.
PreRender()- Fires at the brief moment before the page is displayed to the user
as HTML.
================================================================================
========
17)What is AppDomain ?
Answer:
In .NET facility is provided to create logical partitions inside the process a
nd these
partitions is called as AppDomain. A single process can have one or more AppDoma
in.
================================================================================
========
18)What is an ASP.NET Web Form?
Answer:
ASP.NET Web forms are designed to use controls and features that are almost as p
owerful as
the ones used with Windows forms, and so they are called as Web forms. The Web
form uses
a server-side object model that allows you to create functional controls, which
are
executed on the server and are rendered as HTML on the client. The attribute, r
unat="server",
associated with a server control indicates that the Web form must be processed
on the server.
================================================================================
========
19)Which ASP.NET configuration options are supported in the ASP.NET implementati
on on the shared Web hosting platform?
Answer:
There are many ASP.NET configuration choices, which are not able to configure
at the site
application, or child directory level on the shared hosting environment. Some
options can
produce security, performance, and stability problem to the server and therefo
re cannot be
changed.
================================================================================
========
20)What is httpModule?
Ans:
An http mdule is an assembly that is called on every request that is made to yo
ur application
http modules ar also called as part of the Asp.net request pipleline and have a
ccess to
lifecycle events throught the request.
================================================================================
========
21)What is httphandler?
Answer:
Http handler is the process that runs in response to a request made to an asp
.net
application .The most common http handler is an asp.net page handler that pro
cess the
.aspx files
================================================================================
========
22)What is a round trip?
Answer:
The trip of a Web page from the client to the server and then back to the cli
ent is
known as a round trip.
================================================================================
========
23)Define Virtual folder?
Answer:
It is the folder that contains web applications. The folder that has been pu
blished as
virtual folder by IIS can only contain web applications.
================================================================================
========
24)What are the Web Form Events available in ASP.NET?
Answer:
Page_Init
Page_Load
Page_PreRender
Page_Unload
Page_Disposed
Page_Error
Page_AbortTransaction
Page_CommitTransaction
Page_DataBinding
================================================================================
========
25)Which event determines that all the controls are completely loaded into memor
y?
Answer:
The Page_Load event determines that all the controls on the page are fully lo
aded.
You can also access the controls in the Page_Init event; however, the ViewSta
te
property does not load completely during this event.
================================================================================
========
26)Wha is URI and URL?
AnsWer:
URI- Uniform Resource Identifier: its a string and its responsibility is to id
entify
a resource by meta-information. It gives information about only one resourc
e.
URL- Uniform Resource Locator: identifies the resource on the net and tells i
t is
obtainable using what protocols.
================================================================================
========
27)Is AppDomain created with every request ?
Answer:
No AppDomain is not created with every request .It is created only for the f
irst
request and later on it is reused.
================================================================================
========
28)What are Events of HttpModule?
Answer:
BeginRequest
AuthenticateRequest
AuthorizeRequest
ResolveRequestCache
AcquireRequestState
PreRequestHandlerExecute
PostRequestHandlerExecute
ReleaserequestState
UpdateRequestCache
EndRequest
================================================================================
========
29)What is PreInit?
Answer:
PreInit is the first event in page life cycle. It checks the IsPostBack pro
perty
and determines whether the page is a postback. It sets the themes and maste
r pages,
creates dynamic controls and gets and sets profile property values. This ev
ent can
be handled by overloading the OnPreInit method or creating a Page_PreInit h
andler.
================================================================================
========
30)What is Init?
Answer:
Init event initializes the control property and the control tree is built. Thi
s event
can be handled by overloading the OnInit method or creating a Page_Init handle
r.
================================================================================
========
31)What is InitComplete?
Answer:
InitComplete event allows tracking of view state. All the controls turn on v
iew-state
tracking.
================================================================================
========
32)What is LoadViewState?
Answer:
LoadViewState event allows loading view state information into the control
s.
================================================================================
========
33)What is LoadPostData?
Answer:
During this phase, the contents of all the input fields defined with the <for
m> tag
are processed.
================================================================================
========
34)What is PreLoad?
Answer:
PreLoad occurs before the post back data is loaded in the controls. This eve
nt can be
handled by overloading the OnPreLoad method or creating a Page_PreLoad handl
er.
================================================================================
========
35)What is Load?
Answer:
The Load event is raised for the page first and then recursively for all child
controls.
The controls in the control tree are created.This event can be handled by over
loading the
OnLoad method or creating a Page_Load handler.
================================================================================
========
36)What is LoadComplete ?
Answer:
The loading process is completed, control event handlers are run and page va
lidation
takes place. This event can be handled by overloading the OnLoadComplete met
hod or
creating a Page_LoadComplete handler.
================================================================================
========
37)What is PreRender ?
Answer:
The PreRender event occurs just before the output is rendered. By handling t
his event,
pages and controls can perform any updates before the output is rendered.
================================================================================
========
38)What is PreRenderComplete?
Answer:
As the PreRender event is recursively fired for all child controls, this eve
nt ensures
the completion of the pre-rendering phase.
================================================================================
========
39)What is SaveStateComplete?
Answer:
State of control on the page is saved. Personalization, control state and vi
ew state
information is saved. The HTML markup is generated. This stage can be handle
d by
overriding the Render method or creating a Page_Render handler.
================================================================================
========
40)What is UnLoad?
Answer:
The UnLoad phase is the last phase of the page life cycle. It raises the UnL
oad event
for all controls recursively and lastly for the page itself. Final cleanup i
s done
and all resources and references, such as database connections, are freed. T
his event
can be handled by modifying the OnUnLoad method or creating a Page_UnLoad ha
ndler.
================================================================================
========
41)What are the objects created when a request arrives?
Answer:
HttpContext
HttpRequest
HttpResponse
HttpContext
HttpRuntime
HttpApplication
================================================================================
========
42)What is ApllicationManager?
Answer:
Manages ASP.NET application domains for an ASP.NET hosting application.
================================================================================
========
43)What is Hosting Environment?
Answer:
Provides application-management functions and application services to a mana
ged
application within its application domain. This class cannot be inherited.
================================================================================
========
44)What is HttpRuntime?
Answer:
Provides a set of ASP.NET run-time services for the current application.
================================================================================
========
45)Whay is HttpContext?
Answer:
Encapsulates all HTTP-specific information about an individual HTTP request.
================================================================================
========
46)Whay is HttpRequest?
Answer:
Enables ASP.NET to read the HTTP values sent by a client during a Web request.
================================================================================
========
47)Whay is HttpResponse?
Answer:
Encapsulates HTTP-response information from an ASP.NET operation.
================================================================================
========
48)Whay is HttpApplication?
Answer:
Defines the methods, properties, and events that are common to all applicatio
n objects
in an ASP.NET application. This class is the base class for applications that
are
defined by the user in the Global.asax file.
================================================================================
========

S-ar putea să vă placă și