1. In which event are the controls fully loaded?
Answers:
• Page.PreInit()
• Page.OnLoad()
• Page.Init()
•
Page.Load()
2. Which of the following is/are applicable
while using Server Socket Level communications?
Answers:
• The certificate must
match the web address to prevent a browser warning or error.
• All of
these choices
• The certificate must
be issued by an authority recognized by the client computer to prevent a
browser warning or error.
• A certificate must be
installed on the server.
3. .NET remote server object must implement?
Answers:
• IUnknown
• IMarshalByRef
•
ISerializable
• ISingleCall
• IMarshalByValue
4. "<%=" is the same as:
Answers:
• <&
• <%
• Document.Write
•
Response.Write
5. How can the button click work in the
following code: <asp:ScriptManager
EnablePartialRendering="true" ID="ScriptManager1"
runat="server"></asp:ScriptManager> <asp:UpdatePanel
ID="UpdatePanel1" runat="server"
UpdateMode="Conditional">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" /><br
/> </ContentTemplate>
</asp:UpdatePanel> <asp:Button ID="Button1"
runat="server" Text="Update
Panel" OnClick="Button1_Click" />
Answers:
• Trigger attribute on
Button control
•
Triggers tag with AsyncPostBackTrigger
• TriggerControl
attribute on UpdatePanel
• Trigger element in
UpdatePanel
6. Which of the following locking techniques is
considered speculative?
Answers:
•
SpinWait
• MemoryBarrier
• lock
• SpinLock
7. Contents of assembly file can be investigated
using
Answers:
•
ILDASM.exe
• ILDASM.aspx
• ILDASM.dll
• ILDASM.inc
8. In ASP.Net, session is maintained using the
methods:
Answers:
• Only SQL Server
• Only Session State
Service
• Only In-Process
storage
• (all
of these)
9. What is/are the methods to author pages in
ASP.NET?
Answers:
• In-Line Code
• By-Directional Code
• Code Behind
• Both
In-Line Code and Code Behind
• Outline Code
10. What’s the difference between
Response.Write() andResponse.Output.Write()?
Answers:
•
Response.Output.Write() allows you to stream output
•
Response.Output.Write() allows you to flush output
•
Response.Output.Write() allows you to write formatted output
•
Response.Output.Write() allows you to buffer output
11. What class does the ASP.NET web form class
inherit from by default?
Answers:
• System. Web. GUI.Page
•
System.Web. UI.Page
• System.Web.Form
• System.Web. UI.Form
12. What is the different between int.Parse()
and Convert.ToInt32()
Answers:
•
int.Parse() take only string() but Convert.ToInt32() take any object
• int.Parse() take any
object but Convert.ToInt32() take only string()
• No different between
its
13. The logical and physical boundary created
around every .NET application is known as:
Answers:
• Process Domain
• Process Space
•
Application Domain
• Thread Space
14. How to identify a postback
Answers:
• use Session
• ViewState
• MachineState
• Postback
• use
IsPostback
15. The Asp.net server control, which provides
an alternative way of displaying text on web page, is
Answers:
• < asp:listitem >
• < asp:button >
• <
asp:label >
16. Can you write serverside code inside aspx
page
Answers:
• Yes
use the <% %>
• No cant it should
inside .cs file
17. What is used to validate complex string
patterns? i.e email
Answers:
• Extended Expressions
• Basic Expressions
•
Regular Expressions
• Irregular expressions
18. The property of the Page class used to
determine if the page has posted back is:
Answers:
•
IsPostBack
• HasPostedBack
• PostBack
19. Can you set which type of comparison you
want to perform by the CompareValidator control?
Answers:
• Yes
• No
20. Which of the following is a property all the
ASP.NET controls have?
Answers:
• runat
• bgcolor
• name
• text
21. Give One word: Common type system is built
into which of the following
Answers:
• RCT
• CLR
22. What is ASP.Net
Answers:
• Programming Language
• Server
Side Technology
23. How can I show the entire validation error
message in a message box on the client side?
Answers:
• In the
ValidationSummary control set property called “ShowMessageBox” to true.
• Write custom java
script code and set ScriptEnabled to "true"
• Not supported
24. Which of the following denote the web
control associated with Table control function of ASP.NET?
Answers:
•
TableRow
• ListBox
25. What is the syntax to inherit from a class
in C#?
Answers:
• Place
a colon and then the name of the base class.
• The signature of the
virtual method must remain the same
• A class that cannot be
instantiated
26. ASP.NET separates the HTML output from
program logic using a feature named as
Answers:
• None of the above
• Code-front
•
Code-behind
• Exception
27. The number of forms that can be added to a
aspx page is.
Answers:
• 3
• 7
• 2
• 4
• 1
28. What must be done before you can consume a
web service?
Answers:
• Build a proxy library
by using the TblImp.exe utility.
• Build a proxy library
by using the csc.exe utility.
• Build
a proxy library by using the wsdl.exe utility
• Build a proxy library
by using the Disc.exe utility.
29. In Asp.Net Server.MapPath(".")
points to which location
Answers:
• there is no such
function in asp.net
• it will not point to
any location
• points to C:\\My
Documents\Microsoft Visual Studio folder
• points
to the location where your project stored
30. What is the difference in Application State
and View State?
Answers:
• Application State is
stored on the client machine while ViewState is stored on the server.
• None of the above.
•
Application State is stored on the server while ViewState is stored on the
client machine.
31. We can manage states in asp.net application
using
Answers:
• Viewstate
• Session Objects
• Application Objects
• (all
of these)
32. What is the extension of a web user control
file?
Answers:
• .Aspx
• .Asmx
• .Ascx
33. What’s the difference between localization
and globalization?
Answers:
• Different namespaces
• Localization is local
issues while globalization is global issues
•
Localization is from the client perspective while globalization is from the
server perspective
• They’re both the same
34. Which version of ASP .NET MVC has built-in
support for mobile targeting?
Answers:
• MVC 2
• MVC 3
• MVC 4
• MVC 1
35. What is the name of the property to get
client side id for a control at run time?
Answers:
• Name
• ID
•
ClientID
• ClientSideID
36. What is the different between int.Parse()
and Convert.ToInt32()
Answers:
•
int.Parse take only string() but Convert.ToInt32() take [object]
• int.Parse take
[object] but Convert.ToInt32() take only string()
37. Which of the following is not a .NET
compatible language?
Answers:
• VB.NET
• C#, J#
• COBOL.NET, Perl.NET
• Java
• Managed C++
38. Which of the following is a navigation
control:
Answers:
• None of these
• Menu
• Pager
• Repeater
39. Page 1 has this link: <a
href="page2.asp?color=green">Go</a> How can page2.asp get
the "color" parameter?
Answers:
•
Response.Parameter("color")
• Get("color")
•
Request.QueryString("color")
•
Response.QueryString("color")
40. What is default timeout of session in
asp.net?
Answers:
• 10ns
• 10min
• 20 min
• 20 ns
• 1 hr
41. The feature in ASP.NET 2.0 that is used to fire
a normal postback to a different page in the application is called
Answers:
• Theme
• Code-front
• None of the above
• Cross
Page Posting
42. ASP server scripts are surrounded by
delimiters, which?
Answers:
• <%>...</%>
•
<%...%>
• <script>...</script>
•
<&>...</&>
43. ASP.NET stores membership, role management,
and profile information in which database?
Answers:
• netdb
• aspdotnetdatabaase
•
aspnetdb
• aspdotnetdb
44. How do you enable impersonation in the
web.config file?
Answers:
• <impersonate =
"true" />
• <setImpersonate =
"true" />
• <identity
setImpersonate = "true" />
•
<identity impersonate = "true" />
45. Why should you close all database objects
and set them to NULL before leaving the method where the objects were created?
Answers:
• To ensure that the
object’s destructors are called.
• To ensure that the
objects can be reused.
• To
ensure that the connection to the database is closed as soon as possible
46. How ASP.Net Different from classic ASP?
Answers:
• Scripting is separated
from the HTML, Code is interpreted seperately
• Code is separated from
the HTML and interpreted Code is interpreted separately
•
Scripting is separated from the HTML, Code is compiled as a DLL, the DLLs can
be executed on server
47. To load an assembly dynamically, the method
used is:
Answers:
• Assembly.LoadDynamic()
• Assembly.Memory.Load()
•
Assembly.Load()
•
Assembly.Dynamic.Load()
48. What is the default scripting language in
ASP?
Answers:
• Javscript
•
VBScript
• PERL
49. How do you disable client side script in
validators?
Answers:
• Set EnableScript
property to false
• Delete the
EnableClientScript property in the markup code
• Set
DisableClientScript property to true.
• Set
EnableClientScript property to false.
50. How do you get info from a form that is
submitted using the post method?
Answers:
•
Request.Form
• Response.WriteLine
• Request.QueryString
• Response.Write
51. The first method that is executed in the
Page life cycle in ASP.NET is:
Answers:
• Init
•
PreInit
• Page.Load
• PreLoad
52. Can ASP.NET run on a linux server?
Answers:
• No
• Microsoft is planning
to change ASP.NET to run on linux in the future
• Linux doesn’t have
server variants
• Yes,
via the Mono project
53. The property used to support Cross Page
Scripting in ASP.NET is:
Answers:
• AutoPostBackUrl
•
PostBackUrl
• AutoPostBack
54. _______ is a special subfolder within the
windows folder that stores the shared .NET component?
Answers:
• GAC
• Root
• /bin
55. Which of the following statements best
describes setting up an async page in .NET 4.5?
Answers:
•
async=true on page directive, RegisterAsyncTask in page load and async method
• async method
•
TaskFactory.StartNew(method1)
• async=true on page
directive
56. Can Web API be hosted in its own process
without IIS?
Answers:
• Yes
• No
57. By default, ASP.NET store SessionIDs in
Answers:
• Database
•
Cookies
• Cache
• Global variable
58. You are developing ASP.NET templated server
control. You need to ensure that a new ID namespace is created within the page
control hierarchy when the control is added to the page. Which interface should
you implement on the control?
Answers:
• IDataKeysControl
• IDataItemContainer
•
INamingContainer
• IExtenderCtonrol
59. What method(s) must be used with the
Application object to ensure that only one process accesses a variable at a
time?
Answers:
• ThreadLock
• Synchronize()
• Lock()
and UnLock()
60. Can MVC, Web Forms and Web API be mixed in
the same project?
Answers:
• Only MVC and Web
Forms, not Web API
• Only in .NET 4.5
• No
• Yes
61. Which two new properties are added in
ASP.NET 4.0 Page class?
Answers:
• Culture and
Description
•
MetaKeyword and MetaDescription
• Culture and Locale
• Keyword and
Description
62. How can an MVC View be protected from CSRF?
Answers:
•
@Html.AntiForgeryToken() in View and ValidateAntiForgeryToken attribute on
controller action
•
@Html.AntiForgeryToken() in View
• Web.Config app setting
AntiForgeryToken true
• not possible
63. which of the following is not ASP.NET
directives?
Answers:
• page
• import
• web
• register
64. In the following example, is viewstate being
set? (Test.aspx - viewstate
enabled) <asp:Label id=”LabelTest”
runat=”server” /> (Test.aspx.cs) protected override void OnLoad(EventArgs
args) { this.LabelTest.Text =
“changed”; base.OnLoad(e); }
Answers:
• Only if LabelTest.Text
is changed in following events before PreRender
• No
• Yes
• Only in .NET 4+
65. True or False: Without Web.config file application
will not compile or Run.
Answers:
• True
• False
66. In LINQ what is the difference in .Ancestor
and .Parent?
Answers:
• Parent
is the immediate node a level above, Ancestors is all nodes all levels above.
• None of the above
• Parent is the
immediate node a level above, Ancestors is all nodes above and below.
• Parent is the
immediate node below, Ancestors is all nodes above and below.
67. Can you run a web application without the
web.config file?
Answers:
• It will not compile if
there is no web.config file
• Runtime error
• Yes
• No
68. How do you make a controller action async?
Answers:
• return an async Task
from controller action while awaiting within the method
• Register async
controller action in Global.asax
• return
an async Task<ActionResult> from controller action while awaiting within
the method
• return an async Task
from controller action
69. How can you disable client-side validation
in ASP.NET?
Answers:
• By setting
EnableScripting to false
• By
setting the EnableClientScript property to false
• By setting
ValidateScripting to false
• by setting
CauseValidation to false
• By setting
ValidateClientScript to false
70. In which of the following SessionState Modes
the Session_End event fires?
Answers:
• None
• SQL Server
• Inproc
• StateServer
71. The property used to access user's locale
information is:
Answers:
•
System.Web.UI.Page.Locale
• System.Web.Locale
•
System.Web.UI.Page.User
•
System.Web.UI.Page.Culture
72. What is the maximum number of cookies that
can be allowed to a web site?
Answers:
• 20
• 10
• 1
• more than 30
73. The low level Request and Response API to
service incoming Http requests in ASP.NET is called:
Answers:
• HttpAPI
•
HttpHandler
• HttpRequest
• HttpResponse
74. The threading model used in ASP.NET is:
Answers:
• Single Threaded
• STA
• MTA
• Not supported
75. What is the role of the Web API Media Type
Formatter?
Answers:
• Reads
the message body and serializes the response
• Reads the message body
only
• A custom parameter
binding that can read any part of the HTTP request
• Reads from the URI
path and querystring
76. The application event that is fired at the
beginning of each request to the server is called:
Answers:
• Application_OnStart
•
Application_BeginRequest
• Application_Init
• Application_Start
77. The property used to ensure that the encoded
and encrypted viewstate is not tampered is:
Answers:
• ViewStateSafe
• ViewStateSecure
• EnableViewState
•
EnableViewStateMac
78. In ASP.NET if you want to allows page
developers a way to specify static connections in a content page then the class
used is
Answers:
•
ProxyWebPartManager
• System.Activator
• None of the Above
• WebPartManager
79. The infrastructure that supports these
dynamic operations at run time is called the__________.
Answers:
• DLR
• CLR
• CTS
• CLS
80. Which of the following is not a Web Form
Event in ASP.NET: Page_Dispose Page_Error Page_AbortTransaction Page_CommitTransaction
Answers:
• All of these
•
Page_Dispose
• None of these
• Page_Error
81. What can we specify in the web.config to
apply Themes to an ASP.NET application?
Answers:
• <pages
themesEnabled="true" />
•
<pages theme="Windows7" />
• <pages
applyTheme="Windows7" />
• <pages
theme="true" />
82. Which of the following events are correctly
ordered according to the Application lifecycle?
Answers:
• BeginRequest,
AuthenticateRequest, AuthorizeRequest, AcquireRequestState,
ResolveRequestCache, ProcessRequest, UpdateRequestCache, ReleaseRequestState,
EndRequest.
• BeginRequest,
ResolveRequestCache, AuthenticateRequest, AuthorizeRequest,
AcquireRequestState, ProcessRequest, ReleaseRequestState, UpdateRequestCache,
EndRequest.
•
BeginRequest, AuthenticateRequest, AuthorizeRequest, ResolveRequestCache,
AcquireRequestState, ProcessRequest, ReleaseRequestState, UpdateRequestCache,
EndRequest.
• BeginRequest,
AuthorizeRequest, AuthenticateRequest, ResolveRequestCache, AcquireRequestState,
ProcessRequest, ReleaseRequestState, UpdateRequestCache, EndRequest.
83. What is the use of "_" in asp.net?
Answers:
• line
break
• separate
• link
• concatenate
• space
84. What are the primary request headers
involved in Web API content negotiation?
Answers:
•
Accept, Accept-Charset, Accept-Encoding, Accept-Language
• Accept-Charset,
Accept-Encoding
• X-Requested-With,
Accept, Accept-Charset, Accept-Encoding, Accept-Language
• Accept-Charset,
Accept-Encoding, Accept-Language
85. Which property is used to retrieve a
username in Windows Authentication?
Answers:
•
System.Environment.GetUserName
• System.UserName
•
System.Environment.UserName
•
System.Environment.User
86. What is wrong with this code? string email = emailTextbox; string SQL =
"select * from users where username = '"+email+"' ";
SqlCommand myCommand = new SQLCommand(SQL, myConnection) try {
myConnection.Open();
SqlDataReader myReader=myCommand.ExecuteReader(); if (myReader.Read()) { ...
Answers:
• the string email will
not have the right value.
• the SQL is subject to
injection attacks.
• the
string email will not have the right value and the SQL is subject to injection
attacks.
• a SqlDataReader can't
be instantiated from a SqlCommand object.
• There is nothing wrong
in this code.
87. How can Web API OData support be
implemented?
Answers:
• Controller extends
EntitySetController<T>
• Return IQueryable or
IEnumerable
• All of these
•
Controller extends ODataController
88. How can you protect the asp:login object
from SQL Injection attacks?
Answers:
• It is
protected by default.
• Make sure the
connection string used only has read access to the database.
• Set the SqlFilter
property to true.
• Create a SqlFilter
object and pass the inputs through it.
• Use a regular
expression to filter the inputs before login.
89. To prevent a browser from caching an .aspx
page the statement used is:
Answers:
•
Response.Cache.SetNoStore ();
•
Response.NoCache = "true";
• Response.Cache =
"Yes"
• Response.Cache =
"false";
90. What are the three IIS isolation levels?
Answers:
• Pooled, Non pooled,
Not set
• Base, Custom and
Enhanced
• Base, Custom and High
• Low,
Medium and High
91. How do you sign out from forms
authentication?
Answers:
• Using
FormsAuthentication.Logout() method
• Using
FormsAuthentication.Signout() method
• Using
FormsAuthentication.Logoff() method
92. I have a property in my code-behind get { return
(Custom)Session["Custom"]; } set { Session["Custom"] =
value; } and I receive a serialization
error What are the possible solutions?
Answers:
• All of
these will work
• Change the property
type to HashSet<Custom> instead of Custom
• Change sessionstate
mode to InProc
• Add the Serializable
attribute to Custom class
93. What is the role of the Web API Media Type
Formatter?
Answers:
• A custom parameter
binding that can read any part of the HTTP request
• Reads
the message body and serializes the response
• Reads from the URI
path and querystring
• Reads the message body
only
94. Asynchronous behavior is related to
Answers:
• None
of these
• Multi-core Processors
• Parallel Programming
• Threading
95. Which of the following statements is true
about the GridView in .NET 4.5?
Answers:
•
Strongly typed object binding
• Uses AJAX
functionality by default
• Can only be bound to a
data sources or objects that are data bound in code behind
• Uses CSS div’s instead
of html table based layout
96. What is the default timeout for a Cookie?
Answers:
• 20 minutes
• 30
minutes
• 60 minutes
• 40 minutes
97. How do you make a controller action async?
Answers:
• return an async Task
from controller action
• return
an async Task<ActionResult> from controller action while awaiting within
the method
• return an async Task
from controller action while awaiting within the method
• Register async
controller action in Global.asax
98. What is correct Syntax for applying FAViCON
ICON to your web page.
Answers:
• <link
rel="icon" href="/favicon.ico"
type="image/x-icon"/>
• <link
rel="shortcut icon" href="/favicon.ico"
type="image/x-icon"/>
•
<link rel="shortcut icon" href="/favicon.ico"
type="image/x-icon"/> <link rel="icon"
href="/favicon.ico" type="image/x-icon"/>
99. Which of the following is not a WCF service
behaviour?
Answers:
• Recording information
about messages, such as tracking, tracing, or logging
• Adding security
features to a service, such as impersonation, authorization, or managing tokens
•
Endpoint addresses
• Message and validation
100. "<%=" is the same as:
Answers:
• <%
•
Response.Write
• <&
• Document.Write
101. Under what condition(s) should a controller
action be made async?
Answers:
• All controller actions
should be made async
• CPU & IO intensive
• CPU intensive
• IO
intensive
102. How do you turn off cookies for a page?
Answers:
• Set
Cookie.Discard property to true
• Set CookieEnabled =
false in all pages
• Set IsCookieEnabled to
false in all pages
• Set Cookie to false in
all pages
103. To enforce compatibility between ASP.NET
and old COM components that does not support MTA model the attribute used in
the @Page directive is:
Answers:
• aspcompatibility
•
aspcompat
• aspnetcompat
• backwardcompatibility
104. To check for integrity of data in a Request
object, the method used is:
Answers:
•
HttpRequest.ValidateUserInput()
• HttpRequest.Validate()
•
HttpRequest.ValidateInput()
•
HttpRequest.Current.Validate()
105. How does Web API OData support partial
updates?
Answers:
• Patch<T>
parameter in controller action
• PartialUpdatesEnabled
in global.asax.cs
•
Delta<T> parameter in controller action
• PartialUpdatesEnabled
setting in web.config
106. What are the strategies for partitioning
threads in a PLINQ query?
Answers:
• Auto or manual
•
AsParallel().WithDegreeOfParallelism()
•
Chunked, ranged or hashed
• IEnumerable or
IQueryable
107. What can we specify in the web.config to
apply Themes to an ASP.NET application?
Answers:
• <pages
applyTheme="Windows7" />
•
<pages theme="Windows7" />
• <pages
themesEnabled="true" />
• <pages
theme="true" />
108. The XML format that you can use to render
DataSet object contents to XML is called:
Answers:
• RenderXML
•
DiffGram
• RenderDataSet
• XMLRender
109. Which of the following statements is true?
Answers:
•
IEnumerable is a pull based sequence
• IEnumerable is both
push and pull based
• IEnumerable is thread
safe by default because each iterator gets an IEnumerator
• IEnumerable is a push
based sequence
110. What are the built-in WCF message encoder
implementations?
Answers:
• StringMessageEncoder,
BinaryMessageEncoder & MtomMessageEncoder
•
TextMessageEncoder, BinaryMessageEncoder & MtomMessageEncoder
• All of these
• TextMessageEncoder,
BinaryMessageEncoder & AtomMessageEncoder
111. Caching in ASP.NET is used to:
Answers:
• Reduce redundant object
creation
• Reduce
server round trips
• Load pages from memory
• Reduce database hits
112. The property used to set absolute cache
expiration in ASP.NET is:
Answers:
• Cache.NoExpiration
•
Cache.NoSlidingExpiration
•
Cache.SetAbsoluteExpiration
•
Cache.AbsoluteExpiration
113. Postback occurs in which of the following
forms.
Answers:
• HTMLForms
• Winforms
•
Webforms
114. What class does the ASP.NET web form class
inherit from by default?
Answers:
•
System.Web. UI.Page
• System.Web.Form
• System.Web. UI.Form
• System. Web. GUI.Page
115. What is the different between int.Parse()
and Convert.ToInt32()
Answers:
• int.Parse() take any
object but Convert.ToInt32() take only string()
•
int.Parse() take only string() but Convert.ToInt32() take any object
• No different between
its
116. How ASP.Net Different from classic ASP?
Answers:
• Scripting is separated
from the HTML, Code is interpreted seperately
• Code is separated from
the HTML and interpreted Code is interpreted separately
•
Scripting is separated from the HTML, Code is compiled as a DLL, the DLLs can
be executed on server
117. How can I show the entire validation error
message in a message box on the client side?
Answers:
• Write custom java
script code and set ScriptEnabled to "true"
• In the
ValidationSummary control set property called “ShowMessageBox” to true.
• Not supported
118. What is the different between int.Parse()
and Convert.ToInt32()
Answers:
•
int.Parse take only string() but Convert.ToInt32() take [object]
• int.Parse take
[object] but Convert.ToInt32() take only string()
119. In Asp.Net Server.MapPath(".")
points to which location
Answers:
• points
to the location where your project stored
• there is no such
function in asp.net
• it will not point to
any location
• points to C:\\My
Documents\Microsoft Visual Studio folder
120. Page 1 has this link: <a
href="page2.asp?color=green">Go</a> How can page2.asp get
the "color" parameter?
Answers:
•
Response.QueryString("color")
• Get("color")
•
Request.QueryString("color")
•
Response.Parameter("color")
121. How do you enable impersonation in the
web.config file?
Answers:
• <identity
setImpersonate = "true" />
•
<identity impersonate = "true" />
• <setImpersonate =
"true" />
• <impersonate =
"true" />
122. What is the method name to make upper case
to string value?
Answers:
•
ToUpper()
• toUpperCase()
• ToUpperCase()
• Toupper()
• ToUpperString()
123. What is the different between int.Parse()
and Convert.ToInt32()
Answers:
• int.Parse() take any
object but Convert.ToInt32() take only string()
• No different between
its
•
int.Parse() take only string() but Convert.ToInt32() take any object
124. What is wrong with this code? string email = emailTextbox; string SQL =
"select * from users where username = '"+email+"' ";
SqlCommand myCommand = new SQLCommand(SQL, myConnection) try {
myConnection.Open();
SqlDataReader myReader=myCommand.ExecuteReader(); if (myReader.Read()) { ...
Answers:
• a SqlDataReader can't be
instantiated from a SqlCommand object.
• There is nothing wrong
in this code.
• the string email will
not have the right value.
• the SQL is subject to
injection attacks.
• the
string email will not have the right value and the SQL is subject to injection
attacks.
125. To prevent a browser from caching an .aspx
page the statement used is:
Answers:
•
Response.NoCache = "true";
• Response.Cache =
"Yes"
• Response.Cache =
"false";
•
Response.Cache.SetNoStore ();
126. What is correct Syntax for applying FAViCON
ICON to your web page.
Answers:
•
<link rel="shortcut icon" href="/favicon.ico"
type="image/x-icon"/> <link rel="icon"
href="/favicon.ico" type="image/x-icon"/>
• <link
rel="icon" href="/favicon.ico"
type="image/x-icon"/>
• <link
rel="shortcut icon" href="/favicon.ico"
type="image/x-icon"/>
127. What can we specify in the web.config to
apply Themes to an ASP.NET application?
Answers:
• <pages
applyTheme="Windows7" />
• <pages
theme="true" />
• <pages
themesEnabled="true" />
•
<pages theme="Windows7" />
128. Which file is used to configure an asp.net
website?
Answers:
• asp.settings
• index.html
•
web.config
• power.cs
• settings.ini
129. Which formats can Web API work with?
Answers:
• XML
• All of these
• xVx
• ATOM Pub
130. Which method of the ServiceController class
will allow you to send a command to the service?
Answers:
• Start()
•
ExecuteCommand()
• Stop()
• Pause()
131. Which of the following file types is
associted with ASP.NET User controls?
Answers:
• .aspx
• .asax
• .ascx
• .asmx
132. When an .aspx page is requested from the
web server, the out put will be rendered to browser in following format.
Answers:
• WML
• XML
• JSP
• HTML
133. Which is the parent class of Web server
control?
Answers:
• System.Web.Type
•
System.Web.Ul.BaseControl
• System.Web.Ul.Type
•
System.Web.Ul.Control
134. Which attribute must be set on the
validator control for the validator to work?
Answers:
• validatecontrol
•
ControlToValidate
• controltobind
• validate
135. Which of the following controls is used to
validate that two fields are equal?
Answers:
•
CompareValidator
• Equals() method
• Required Field
Validator
•
RegularExpressionValidator
136. Where are private assemblies stored in
ASP.NET?
Answers:
• windows directory
• root directory of
bootable drive
• application root
directory
•
application / bin directory
137. Which HTML control property should be set
to access control from code behind?
Answers:
• ID =
"TextBox2"
• ClientID =
"TextBox1"
• RunatServer =
"True"
• Runat
= "Server"
138. Which of the following ASP.NET directories
stores class files (.cs) by default?
Answers:
• App_Data
•
App_Code
• Bin
• App_GlobalResources
139. Which method do you use to kill explicitly
a users session?
Answers:
• Session.Kill(true)
method
• Session.Kill() method
• Session.Flush() method
•
Session.Abandon() method
140. Which of the following contains one or more
variables that are accessed through sequential indices?
Answers:
• Indexers
• Arrays
• Delegates
• Nullable Types
141. Which of the following denotes the web
control associated with Table control function of ASP.NET?
Answers:
• ListBox
•
TableRow (ANS)
• DataList
142. When would WCF be a better solution than
Web API?
Answers:
• Need for REST
• Need for XML
• Need
for SOAP
• Need for metadata
143. Where is the default Session data stored in
ASP.Net?
Answers:
• StateServer
•
InProcess
• Session Object
144. Which method has been introduced in ASP.NET
4.0 to redirect a page permanently?
Answers:
• Redirect(true) method
• PermanentRedirect()
method
• Page.Redirect(true)
method
•
RedirectPermanent() method
145. Which HTML control property should be set
to access control from code behind?
Answers:
• Runat
= "Server"
• RunatServer =
"True"
• ID = "TextBox2"
• ClientID =
"TextBox1"
146. Where is the ViewState information stored?
Answers:
• in cookies
• in the
HTML hidden fields.
• in database
• in session variables
• query string
147. When decorating a function with async, what
is the appropriate return type?
Answers:
•
Task<>
• List<Object>
• async
• Task<object>
No comments:
Post a Comment