1. 1) What is the difference between Convert.ToInt32(string) and
Int32.Parse(string)?
S.N Int32.Parse(string) Convert.ToInt32(string)
o
1 It throws an exception when It returns zero when null value is
null value is passed passed
2) What is the difference between EVAL and BIND?
S.N EVAL BIND
o
1 It is readonly It is editable
2 Used to display only Used to both display and update
3) What is the main difference between MVP and MVC?
S.N MVP MVC
o
1 In MVP, the View is In MVC,the Controller and the
completely controlled by the Model can update the View
Presenter
4) What are the differences between Inline code and Code Behind
Code?
S.N Inline code Code Behind Code
o
1 Its within .aspx file Its in a external class file
2 Dynamically compiled Compiled prior to deployment
and
linked with .aspx file
5) What are the differences between Global.asax and
Web.Config?
S.N global.asax web.config
o
1 It is a class file It is an XML file
2 There can be only one for an There can be many if under
application different sub-folders
3 Can have Application and Cannot have Application and
Session events Session events
4 Need to be recompiled when No need to compile when
changes are made changes are made
2. 6) What are the Differences between Server.Transfer and
Response.Redirect?
S.N Server.Transfer Response.Redirect
o
1 The navigation happens on The navigation happens on the
the server-side ,so client client-side ,so client history is
history is not updated updated
2 Data can be persist across Context.Items loses the
the pages using Context.Item persistence
collection
3 No Round-trips Makes a Round-trip
4 Has Good encapsulation No
7) What is the difference between a custom control and a user
control?
S.N User Control Custom Control
o
1 Is a file with the .ascx Is a file with the .dll extension
extension
2 Can be only used with the Can be used in any number of
application applications
3 Language dependent They are language independent,
a control
created in c# can be used in
vb.net
4 Cannot be added to Visual Can be added to Visual studio
studio Toolbox Toolbox
5 Inherits from Server controls We have to develop from
and easy to create scratch ,
so comparatively
difficult
6 Generally used for static Used when dynamic content is
content required
8) What is the difference between Caching and Application?
S.N Caching Application
o
1 Cache have expire policy Application does not have expire
policy
2 Cache does not require Application require explicit
explicit locking locking
3 Cache has the Property of Application variables exist as
timeout, which allows us to long as the application is alive
control the duration of the
3. Objects so cached
4 Output can be cached in 4 Application does not have
ways, options as like Cache object
• Page Output Caching
• Page Partial Caching
• DataSource Caching
• Data Caching
5 It is accessible to page level
It is accessible to both page
to all the users level and application level to all
the users
9) What is the difference between web farm and web garden?
S.N Web farm Web garden
o
1 A web application running on A web application running on a
multiple servers is called a single server that has multiple
web farm CPUs is called a web garden
10) What is the difference between Application and Session
Events?
S.N Application Event Session Event
o
1 Application events are used Session events are used to
to initialize objects and data initialize data that we want to
that we do want to make keep throughout individual
available to all the current sessions, but that we do not
sessions of our web want to share between sessions
application
11) What is the difference between Session Cookies and
Persistent Cookies?
S.N Session Cookies Persistent Cookies
o
1 Session Cookies do not have Persistent Cookies have an
expiration date expiration date. The expiration
date indicates to the browser
that it should write the cookie to
the client’s hard drive
12) What are the differences between Server Controls and
HTML Controls?
S.N Server Controls HTML Controls
o
4. 1 Server Controls can trigger HTML Controls can trigger only
control-specific events on the page-level events on server
server (postback)
2 Data entered in a server Data is not maintained in an
control is maintained across HTML control. Data must be
requests. Server controls saved and restored using page-
retain state level scripts
3 The Microsoft .NET HTML controls have HTML
Framework provides a set of attributes only
properties for each server
control. Properties allows us
to change the server
control’s appearance and
behavior within server-side
code
4 Server controls automatically We must detect browser in code
detect browser and adapt or write for least common
display as appropriate denominator
13) What are the differences between ViewState and Hidden
fields?
S.N ViewState Hidden fields
o
1 This is used for pages that This is used for pages that will
will postback to itself postback to itself or to another
page
2 This is built in structure for This is not an inbuilt structure
maintaining state of a page
3 Security is more as data is Security is less when compared
hashed, compressed and to ViewState
encoded
14) What is the difference between SQL Cache Notification
and SQL Cache Invalidation?
S.N SQL Cache Notification SQL Cache Invalidation
o
1 Using SQL Cache Using SQL Cache Invalidation, we
Notification, we can generate can make a cached item invalid
notifications when the data of that depends on the data stored
a database on which a in a SQL server database, when
cached item depends the data in the SQL server
changes database is changed
15) What is the difference between absolute time expiration
and sliding time expiration?
5. S.N Absolute time expiration Sliding time expiration
o
1 In absolute time expiration, a In sliding time expiration, the
cached item expires after the time for which the item is cached
expiration time specifies for is each time incremented by its
it, irrespective of how often it expiration time if it is accessed
is accessed before completion of its
expiration time
16) What is the difference between adding items into cache
through Add() method and Insert() method?
S.N Cache.Add() Cache.Insert()
o
1 Cache.Add() method also Cache.Insert() method adds only
returns an object the item in the cache
representing the item we
have added in the cache
,besides adding the item in
the cache
2 It is not possible to replace We can replace an existing item
an existing item in the cache in the cache using the
using the Cache.Add() Cache.Insert() method
method
17) What is the difference between page-level caching and
fragment caching?
S.N Page-level caching Fragment caching
o
1 In Page-level caching, we In Fragment caching, we cache
cache a whole page parts of the web page such as a
user control added to the web
page
18) What is the difference between Label control and Literal
control?
S.N Label control Literal control
o
1 Final HTML code of a Label Final HTML code of a Literal
control has an HTML tag control contains only text, which
is not surrounded by any HTML
tag
6. 19) What is the difference between HyperLink control and
LinkButton control?
S.N HyperLink control LinkButton control
o
1 A HyperLink control do not A LinkButton control have Click
have Click and Command and Command events, which can
events be handled in the code behind
file of the web page
20) What is the difference between an HtmlInputCheckBox
control and an HtmlInputRadioButton control?
S.N HtmlInputCheckBox HtmlInputRadioButton
o control control
1 We can select more than one We can select only a single
HtmlInputCheckBox control HtmlInputRadioButton control
from a group of from a group of
HtmlInputCheckBox controls HtmlInputRadioButton controls
21) How a content page differs from a master page?
S.N Content page Master page
o
1 A content page does not A master page has complete
have complete HTML source HTML source code inside its
code source file
22) How will you differentiate a submaster page from a top-
level master page?
S.N Submaster page Top-level master page
o
1 Like a content page, a Top-level master page has
submaster page also does complete HTML source code
not have complete HTML inside its source file
source code
23) What is the difference between a page theme control and
a global theme?
S.N Page theme Global theme
o
1 A page theme is stored inside A global theme is stored inside
a subfolder of the the Themes folder on a web
App_Themes folder of a web server
7. application
2 It can be applied to individual It can be applied to all the web
web pages of the web sites on the web server
application
24) What is the difference between a default skin and a
named skin?
S.N Default skin Named skin
o
1 A default skin does not have A named skin has a SkinId
a SkinId attribute attribute
2 It is automatically applied to It is applied to a control explicitly
all the controls of the same by setting the SkinId property of
type present on a web page the control from the Properties
window
25) Differentiate Globalization and Localization
S.N Globalization Localization
o
1 Globalization is the process of Localization is the process of
identifying the specific configuring a web application to
portion of a web application be supported for a specific
that needs to be different for language or locale
different languages and
isolating that portion from
the core of the web
application
26) What are the differences between web.config and
machine.config?
S.N web.config machine.config
o
1 This is automatically created This is automatically installed
when we create an ASP.Net when we install Visual Studio.
web application project Net
2 This is also called application This is also called machine level
level configuration file configuration file
3 We can have more than one Only one machine.config file
web.config file exists on a server
4 This file inherits setting from This file is at the highest level in
the machine.config the configuration hierarchy