1) What are the ASP.NET
page Life-cycle stages?
There
are some stage of asp.net page Life-Cycle stages which are given below:-
Page Request
Page Request
1. Start
2. Initialization
3. Load
4.
Postback even handling
5. Rendering
6. Unload
2) What is the ASP.NET
Life cycle Events?
1. PreInit
2. Init
3. InitComplete
4. PreLoad
5. Load
6. Control events
7. Load complete
8. PreRender
9. PreRender Complete
10. Savestate Complete
11. Render
12. Unload
3) What is the Namespace
is used for web server control in ASP.NET?
System.Web.UI.Control
4) Is Session state object
encapsulate the state of browser and the client?
Yes
Yes
5) What is protected
configuration in ASP.NET?
It is used to provide secure connection string information in asp.net Application.
It is used to provide secure connection string information in asp.net Application.
6) What
is difference between User and Server controls?
User
controls are basically created by the Developers and use it any specific
application. But Server controls are built-in controls.
7) Which protocol is used to call a web services in
ASP.NET?
HTTP Protocol
8) What is difference between Custom control and User
control?
1. User Control can only be used within
a single application. But custom controls are assemblies (DLL Files) that can
be used in multiple applications.
2. User Control cannot add to the
Toolbox in visual studio while Custom Control can be easily added to the
toolbox.
3. User Controls provide limited support
to user while Custom controls provide full support to the user.
4. User controls are
less convenient to use in advance than custom controls.
9) What is difference between web.Config file and
Machine.Config file?
Web.Config file:- it is specific to a web application. We can use multiple Web.Config
file in one ASP.NET application.
Machine.config:- It is specific to a machine or server. We can use only one Machine.Config
on server.
10)
What are the major built-in objects in ASP.NET?
The major built-in
objects in ASP.NET are as follows:
Application
Session
Context
Request
Response
Server
Trace
11) How to use connection
string in web.config file?
<appSettings>
<add
key="msg" value="msdotnet"/>
<add
key="app_con" value="data source=my-pc;integrated
security=yes;database=mas"/>
</appSettings>\
Note:
1. App settings make the code faster.
2. It allows better codes separation and clarity.
12) What are the different
types of directories used in ASP.NET?
@Page
@Import
@Control
@Register
@Reference
@Output Cache
@Assembly
@Implements
13) What is Namespace used
for Globalization and Localization in Asp.Net?
System.Globalization
System.Resources
14) How to know this
website is made in asp.net, asp, jsp, html, php etc.?
We can
see the extension of each type of web application in url bar as
given below:-
ASP.NET
---> .aspx
ASP
--->.asp
java
---> .jsp
HTML
---> .html
PHP
--->.php
But
some time you have not found any extension in url bar in web application, then
you have to put each extension in url bar one by one and check, if no error is
found then you can easily predict that application.
15) What is caching concepts
in Asp.Net?
Caching is a place where data is stored temporarily. This data can be stored for a specific time period on the server or client system.
Caching is a place where data is stored temporarily. This data can be stored for a specific time period on the server or client system.
16) What are the different
types of caching in Asp.Net?
Output Caching
Fragment caching
Data caching
17) What is different
between Execute Scalar and ExecuteNonQuery?
ExecuteScalar :--> It Returns output value. It is basically used
for fetching a single value.
ExecuteNonQuery:--> It does not return any value but number of rows affected by the Query. It is normally used to execute Insert and update commands.
ExecuteNonQuery:--> It does not return any value but number of rows affected by the Query. It is normally used to execute Insert and update commands.
18) Can we run Asp.Net web application without
Web.Config file?
Yes.
19) What Method is used to fail the User session?
Session.abandon Method.
20) What are the ways to fire the method events in
Asp.Net?
Init() --> It is fired at initial
level.
Load() --> It is fired when page is
loaded on the server.
PreRender() --> It is fired to display
the user page and html .
Unload()-->It is fired when page is loaded
completely.
21) What is the Class used for sending the email in
Asp.Net?
System.web.MailMessaging.class
System.web.Mail.Smtpmail.class
22) What is Formatter in Asp.Net?
A Formatter is an object that is used to
encoding and serializing the data into message at one end and
decoding and de-serializing the data at other end. It may be server End or
client end.
23) Which configuration file is supported by all
protocols in Asp.Net?
Machine.config file.
24) Which classes are used to fetch the user's
local information in Asp.Net?
System.Web.UI.Page.Culture
System.Web.UI.Page.Culture
25) Is View state information stored in HTML Header
files in Asp.Net?
Yes.
Yes.
26) What method is used for sign out in Form based
authentication?
FormsAuthentication.Signout().
FormsAuthentication.Signout().
27) What is the way to authenticate the user
manually in asp.net application?
Hard code value
Web.config file
28) Which Namespace is used to perform form based
authentication in Asp.Net?
System.Web.Security
System.Web.Security
29) Which attributes and elements are used in form
based authentication in web.config file?
1. Name
2. Login URL
3. Default URL
4. Timeout
5. Sliding Expiration
6. Protection
7. Path
8. Required SSL
9. Credentials
10. Authentication
30) Which Password Format Attribute does use in
web.config in form based authentication?
Clear
SHA 1
MD5
31) What is the use of RedirectLoginPage Method in
form based authentication?
This function takes two arguments, one is for user name for which cookie is created and second one is Boolean value to specify whether cookie is persistence or Non persistence.
This function takes two arguments, one is for user name for which cookie is created and second one is Boolean value to specify whether cookie is persistence or Non persistence.
32) What are the basic elements used which provide
security in asp.net application?
Authentication
Authorization
Confidentiality
Integrity
33) What is caching in asp.net website?
Caching is basically used to store the data temporarily either on web server or on the client system/browser.
Caching is basically used to store the data temporarily either on web server or on the client system/browser.
34) What are the two types of caching used in
asp.net?
1. Application
Label
2. Session
Label
35) What are the three label of caching used in
asp.net?
1. Page output
Caching
2. Fragment
caching (partial caching)
3. Data
Caching
36) What is the use of
VaryByCustom Attribute in Caching?
The VariByCustom attribute is used for a Custom
strings according to the requirements of a user.
37) Which three main controls are used to
display the Entire table data in asp.net?
1. Grid
View control
2. Repeater
control
3. Data
List Control
38) What is the difference between Repeater
control, Grid View Control and Data List control in asp.net?
1. Repeater and Data List
controls don't have any default layout. We specify the template to
display the data .But Grid view control has a default layout to display the
data in Row and Column.
2. By default on browser side
repeater control is not converted in any 'HTML' tag but Grid view and Data List
controls converted in 'HTML' table tag.
3. Repeater control does not
have any Predefined event to add and delete the records but Grid view and Data
list Controls have this event to added and delete the records.
39) What is data Mining in Asp.Net?
Binding the data with control is called "data Mining".
Binding the data with control is called "data Mining".
40) What types of data mining is used in
asp.net?
1. Simple Data Mining
2. Complex data mining
41) How to bind variables with controls in Design
section of asp.net page?
<asp :Label ID ="Label 1" run at ="server" Text '<%#str>' Label </asp:Label>
<asp :Label ID ="Label 1" run at ="server" Text '<%#str>' Label </asp:Label>
42) What are the two types
of temporary object used for creating temporary table in
Database?
Local temporary object
Global temporary object
43) What is the use of
HTTP Handler application in ASP.NET?
HTTP Handler is used to handle the user request
for the web application resources. It is also known as request response model
of web application.
44) What is the use of Details View and Form view
controls in asp.net?
These controls can be used to show and manipulate the data in asp.net. Both control show only one record a time. Details view has a default layout like grid view. But Form view has not a default layout like Data List and Repeater control. We can easily perform insert, edit, update, delete and print operations by these controls.
These controls can be used to show and manipulate the data in asp.net. Both control show only one record a time. Details view has a default layout like grid view. But Form view has not a default layout like Data List and Repeater control. We can easily perform insert, edit, update, delete and print operations by these controls.
45) Can we attach the Master page in an Existing Form of Asp.Net?
Yes.
46) What are the Server
Controls in ASP.NET?
ASP.NET server controls are components
that run on the server and encapsulate user interface and related
functionality .They are used in ASP.NET code behind and pages.
47) How can differentiate web server controls and custom controls?
Web user controls:-
1. It is easier to create.
2. It is good for static layout.
3. It provides limited support for
consumers who use a visual design tool.
4. We can’t be added it to the toolbox in
visual studio.
5. A separate copy of the control is
required in any application.
Web custom controls:-
1. It is harder to create.
2. It is good for dynamic layout.
3. It provides full visual design tool support
for consumers.
4. It can be added to the toolbox in visual studio.
5. In the global assembly cache, only a single copy of the
control is required.
48) What method is used to explicitly kill user’s session?
We use Abandon () method for this.
49) What are the different ways we would consider sending data
across page in Asp.Net?
Properties (public)
Session
50) How do implement AutoPostBack with a text box?
Set AutoPostBack properties = True;
Set AutoPostBack properties = True;
51) What is role based Security in Asp.Net?
A role is a named set of principles that have the same privileges with respect to security .A principal can be a member of one or more roles .Therefore; applications can use role membership to determine whether a principal is authorized to perform a request action.
52) Which are two properties used on every validation control?
ControlToValidate
ErrorMessage
53) How to use Session
State tag in Web.config file?
We can configure session state features via
the <sessionstate> section in a web.config file. The default of
asp.net session is 20 minutes. We can change it from your web.config file.
We can add the following to the web.config file of an
application. <session state timeout = “30”/>
54) What is AutoEvent Wirup Attribute in ASP.NET?
It is attributing of @Page Directive. By default
its value is 'True' that means event of page class will be bound automatically
with event handlers but if it is 'false' then we need to bind event
handler with page class event manually.
55) What is Singleton and single call in .NET?
Singleton: - these types never have more than one instance exists, all client requests are served by that instance.
Singleton: - these types never have more than one instance exists, all client requests are served by that instance.
Single Call:-these types always have one
instance per client request. The next method invocation will be serviced by a
different server instance, even if the previous instance has not yet been
recycled by the system.
56) What are the Data
Types supported by Range Validator Control in ASP.NET?
Integer
Date
String
57) What is Dynamic page
in ASP.NET?
C#
codes provide dynamic functionality in any asp.net application.
58) What are the ways to
maintain the state in ASP.NET Application?
1. Query String
2. Cookies
3. Hidden field controls
4. Session
5. Application Objects
59) What is @ Register
Directives in ASP.NET?
It
informs to compiler whether any custom server control is added to the page or
not.
60) How can we change timeout property for a Session
Object in ASP.NET?
We
can change timeout for a session object by set the timeout property in
web.config file in asp.net application.
61) Which property is common to every validation control in ASP.NET?
ControlToValidate
Error Message
62) Which property is used to turn off the Cookies for
a page in ASP.NET?
Cookie.Discard
63) Which Namespace is used for debugging the
application in ASP.NET?
Using
System.Diagnostic;
64) Which events support in HTTP Session class in ASP.NET?
1. Load event
2. Unload event
65) How to create
permanent Cookies in ASP.NET Application?
Set cookie.Expirytime
= MaxValue.
66) How to redirect the user to another web page
without performing round trip to the
Client in ASP.NET Application?
Server.transfer();
67) What data type support in Range Validator control in Asp.Net?
Integer
Double
Currency
Date
String
68) How can disable view state in Asp.Net?
Set EnableViewState ='false'
Set EnableViewState ='false'
69) What extension is used in web services?
.ASPX
.ASPX
70) What are the different types of extension used in asp.net?
.aspx
-->web form
.ascx
--> Web user Control
Master
--> Master Page
.edmx
--> Ado Entity Data Model
.ascx
--> Dynamic data Field
.html
---> Html page
.mdf
--> SQL Data base
.config
--> web configuration
.asmx -->
web services
.cs
---> class file
.rpt
---> crystal report
.xsd
--> Data set
.xml
--> XML File
71) How to Disable Client Side Script in Validation
Controls?
Set property
"EnablclientScript"='false'
72) Is Global.asax is used to handle the session
and application state?
Yes.
73) How to allow automatic paging in GridView,
DataList and Repeater controls?
Set
property of each control: - Allow paging= ‘True’.
74) Which file is known as configuration file in
asp.net?
Web.config file.
75) What are web services in Asp.Net?
Web Services is
service which is available over the web. A Web Service
is used to implement the specific functionality to execute the business logic
codes of the application. This technologies allowed to developer to create a
specific component once (make only logic code) so that they can share it across
the multiple application by multiple developers.
76) Which Technologies
were using before web services in Asp.Net?
Component object model (COM)
Distributed Component object model (DCOM)
77) What are the advantage of web services
over COM and DCOM Technology?
1. Web Services are very simple in use.
2. Web Services do not carry any state information, so
that multiple requests can be processed simultaneously.
5. With the help of Web Services, we can easily
integrate asp.net web application with third party systems.
6. Web Services is useful in security purpose as ssl and
window authentication of asp.net application.
78) What is WSDL in
Asp.Net?
It is known as Web Service Description
Language. It is a standard used by the web service to describe what a web
service can do.
WSDL
is a XML-based language that defines web services. Every web service holds WSDL
document that specifies the location of the web service.
79) What are elements used
in WSDL Document?
Message
Type
Binding
Port
Port
type
Service
80) What is SOAP in
Asp.Net?
It
is known as Simple object access protocol. It is a standard used by the web
service to send the response (or request) message to the application .It is
completely XML based protocol.
81) What is DISCO.EXE File
in Asp.Net?
It
is known as the web service discovery tool, it is used for publishing and
discovering web services.
82) What is UDDI in
Asp.Net?
It
is known as Universal Description, Discovery and Integration .UDDI includes
four types of services.
Web
service
Business
Specifications
83) What is Main Features
of UDDI in Asp.Net?
1. It stores the information of web services.
2. It
uses W3C & IETF standards (ex. XML, HTTP, DNS etc.).
3. It
uses SOAP for communication.
4. It
uses WSDL to describe interfaces to web services.
84) What are the main advantages
of web services in Asp.Net?
1. It
enhances the security feature of any website.
2. It
takes less processing time to calculate the logic code.
3. It
can easily handle multiple requests at a time simultaneously.
4. It
is compatible to communicate with different platform.
5. It
follows XML, HTTP Standards.
No comments:
Post a Comment