1. While using the declaration below, what is
the result of clicking on the control?
<input id="Button1"
type="button" onclick="return Button1_onclick()"/>
Answers:
• The
browser will invoke the client script function named Button1_onclick
• The page will postback
and the server will invoke the Button1_onclick method of the page.
• The declaration is not
valid because it does not contain a runat="Server" attribute
• <input />
elements are not valid in ASP.NET web sites
2. By default, the rights of which Windows
Account are used by an anonymous Web Site access?
Answers:
•
Administrator
• IUSER_MachineName
(where the MachineName is the actual computer name)
• ASPNET
• Guest
3. Custom non-fatal exceptions should be derived from:
Answers:
• ApplicationException
•
DataMisalignedException
•
ExecutionEngineException
• SystemException
4. Which of the following is true about VB generics?
Answers:
• VB allows non-type
template parameters
• VB supports explicit
specialization
• VB allows the type
parameter to be used as the base class for the generic type
• VB allows a generic
type parameter itself to be a generic
• VB enforces that all
codes are valid for all types of parameters
5. Which of the following does Event Bubbling
allow composite controls to perform?
Answers:
• Propagate container
related events to the child controls.
• Propagate child events
up to control hierarchy
• Distribute events
between peer child controls.
• Translate control
unhandled control events into exceptions.
6. Which access limitation does a class member
declared "Protected Friend" have?
Answers:
• Access is limited to
the containing class plus any classes derived from the containing class
• Access is limited to
the current assembly
• Access is limited to
the containing class plus any classes derived from the containing class that
are also in the current assembly
• Access is limited to
the containing class plus any classes derived from the containing class or any
other class in the current assembly
7. Which of the following can be used to
preserve state information?
Answers:
• ApplicationState
• SessionState
• ViewState
• Page Instance
Variables
• All of the above
8. Which of the following statement is not true
related to Data Provider in ADO.NET?
Answers:
• It is responsible for
providing and maintaining the connection to the database.
• It is a set of related
components that work together to provide data in an efficient and performance
driven manner.
• It includes a
DataAdapter class, which provides a high-performance mechanism for retrieving
data
9. Determining the availability of sufficient
memory for an operation can be accomplished by:
Answers:
• There is no supported
application level means to determine if a specific amount of memory is
available.
• using static methods
of System.Runtime.MemoryFailPoint and checking the return value
• creating an instance
of System.Runtime.MemoryFailPoint and monitoring for an
InsufficientMemoryException
• creating an instance
of System.Runtime.MemoryFailPoint and monitoring for an OutOfMemoryException
10. Which of the following tasks are appropriate
for accessing a Web Service from the client code?
Answers:
• Creation of a Style
Class to define the behavior.
• Writing a script
method to initialize and invoke the methods of the service.
• Addition of HTML Elements
to display the results of the Web Service calls.
• Inclusion of the Web
Service Schema information as XML
11. Which of the following elements can be
adjusted when using the ProcessModel element of the Machine.Config file?
Answers:
• The number of queued
requests before returning "Server Busy (error: 503)"
• The maximum number of
threads per processor
• The minimum number of
worker threads to use for the process on a per-CPU basis
• The maximum amount of
memory utilized per request
12. Of which elements does Generics allow
parameterization by type?
Answers:
• Classes
• Structs
• Methods
• Events
• Fields
13. Which of the following are true about event
handling?
Answers:
• One method may handle
events from different sources
• A single event can be
handled by multiple methods
• Event handlers must be
members of the same class as raised the event
• Event handlers can be
dynamically added and removed at runtime
• It is impossible to
determine the order in which event handlers will be invoked
14. Which of the following can one use to detect
the user's current language?
Answers:
• Examining the
UserLanguages property of the current Request object.
• Examining the
CurrentCulture property of the current Request object.
• Examining the
CurrentCulture property of the current Thread object.
• Examining the Language
property of the current Page object.
15. Which of the following is not a valid
attribute for impacting serialization?
Answers:
• DataContract
• DataMember
• EnumMember
• CollectionDataContract
• DataObject
16. Which of the following characteristics do
overloaded methods have?
Answers:
• They must have the
same name
• They must have the
same parameter signature
• They must have the
same return type
• They must have the
same access level
• None of the above
17. In which file are Predefined Client Side
Validation Scripts defined?
Answers:
• WebUIValidation.js
• ClientValidation.js
• AspNetValidation.js
• USerValidation.js
18. Which of the following is correct for
Application Center Test (ACT) to perform load testing?
Answers:
• Simulates a large
group of users by opening multiple connections to the server and rapidly
sending HTTP requests.
• It also supports
several other authentication schemes and the SSL protocol, making it ideal for
testing personalized and secure sites.
• It is compatible with
all Web servers and Web applications that adhere to the HTTP protocol
• All of the above.
19. Which of the following operators can be
overloaded?
Answers:
• Assignment (=)
• Conditional
(AndAlso,OrElse)
• Logical (And, Or, Xor)
• Shift (<<,
>>)
20. Which of the following is/are true of the
System.Text.StringBuilder class?
Answers:
• It is less efficient
than string concatenation when many concatenations are performed.
• There is a method
which formats the string being appended to the StringBuilder, much like the
String.Format.
• The StringBuilder is
most efficient when initialized using the parameterless constructor.
21. Which of the following are true when
comparing built in types for equality?
Answers:
• Integral types are
considered equal if they represent the same value.
• Object types are
considered equal if they both refer to the same object or if both are null
• String types are
considered equal if they have identical lengths and identical characters in
each character position
• String types are
considered equal if they have identical dimensions and identical content at
each array index
22. Which of the following differentiates a
UserControl from a Custom Server control?
Answers:
• UserControl can
directly express rendering information via markup; a Custom Server control can
not.
• UserControl does not
require the use of the @Register directive; a Custom Server control does
require it.
• UserControl can make
use of script based validation; a Custom Server control can not.
• UserControl can
represent complete compositate hierarchy; a Custom Server control can not.
23. Which of the following types guarantee
atomic reads and writes?
Answers:
• int
• double
• string
• long
• float
24. Which directive allows the utilization
of a custom web control in an ASP.NET
page?
Answers:
• @Register
• @Include
• @Control
• @Import
25. Which of the following are not valid namespaces in the .NET framework?
Answers:
• System.Data.OleDb
• System.Data.SqlServer
• System.Data.Oracle
• System.Data.Xml
• System.Data.SqlClient
26. Where should an instance of an object which
provides services to all users be stored?
Answers:
• ApplicationState
• SessionState
• ViewState
• None of the above
27. Which of the following conditions can
trigger the automatic recycling of an ASP.NET application hosted in IIS?
Answers:
• A specific number of
requests to the application process.
• An absolute number of
bytes process memory utilization .
• A percentage of
physical memory utilized by the process.
• A specific time
interval
• A specific date and
time
28. Which of the following is used to remove a
cookie from a client machine?
Answers:
• Remove the cookie from
the System.Web.UI.Page.Request.Cookies collection.
• Remove the cookie from
the System.Web.UI.Page.Request.Browser.Cookies collection.
• Set the Expires
property to DataTime.Now for a cookie in the Web.UI.Page.Response.Cookies
• Remove the cookie from
the System.Web.UI.Page.Response.Cookies collection.
29. Which of the following class is used to
divide the time into units such as weeks, months, and years?
Answers:
• System.DateTime
• System.TimeSpan
•
System.Globalization.Calender
•
System.Globalization.CultureInfo
30. Which of the following can you do when
deleting a DataRow from the DataRowCollection of a DataTable?
Answers:
• Use the
DataRowCollection.Remove method to immediately delete the row.
• Use the
DataRowCollection.Remove method to mark the row for deletion when
DataRow.AcceptChanges is called.
• Use the DataRow.Delete
method to immediately delete the row.
• Use the DataRow.Delete
method to mark the row for deletion when DataRowAcceptChanges is called.
31. What does the AndAlso operator do?
Answers:
• It performs a Boolean
AND operation, evaluating both operands
• It performs a Boolean
AND operation, evaluating the left-hand side only if the right-hand side is
false
• It performs a Boolean
AND operation, evaluating the right-hand side only if the left-hand side is
false
• It performs a Boolean
AND operation, evaluating the right-hand side only if the left-hand side is
true
• None of the above
32. Transactions initiated in which of the following
are supported by the System.Transactions infrastructure?
Answers:
• SQL Server
• ADO.NET
• MSMQ
• Microsoft Distributed
Transaction Coordinator (MSDTC).
• All of the above
33. Which of the following are valid
assignments?
Answers:
• Dim i As Int32 =
Int16.MaxValue
• Dim s As Single =
Double.MaxValue
• Dim s2 As String =
Int64.MaxValue
• All of the above
34. Which of the following controls allows the
use of XSL to transform XML content into formatted content?
Answers:
•
System.Web.UI.WebControls.Xml
•
System.Web.UI.WebControls.Xslt
•
System.Web.UI.WebControls.Substitution
•
System.Web.UI.WebControls.Transform
35. Which of the following are true about
declarative attributes?
Answers:
• They must be inherited
from the System.Attribute
• Attributes are instantiated
at the same time as instances of the class to which they are applied
• Attribute classes may
be restricted only to be applied to application element types
• By default, a given
attribute may be applied multiple times to the same application element
36. Where should information about a control
created at design time be stored?
Answers:
• ApplicationState
• SessionState
• ViewState
• None of the above
37. By which of the following can the .NET class
methods be included in .aspx files?
Answers:
• Including .Net code
within the script element with the runat attribute set to server
• Including .Net code
within the code element
• Including .Net code
using the @code directive on the page
• Including .Net code
within the execute attribute of the individual control
38. Which of the following are true about
Nullable types?
Answers:
• A Nullable type is a
structure.
• An implicit conversion
exists from any non-nullable value type to a nullable form of that type.
• Both a) and b)
39. Which of the following are performed to
fully debug an ASP.NET Application running on the same machine as the debugger?
Answers:
• Enabling debug
information in the .NET Assembly
• Setting the debug
attribute of the compilation element to true in the Web.Con file.
• Setting the debug
element of the AspNet element to true in the machine.config file true.
40. What does the OrElse operator do?
Answers:
• It performs a Boolean
OR operation, evaluating both operands
• It performs a Boolean
OR operation, evaluating the left-hand side only if the right-hand side is
false
• It performs a Boolean
OR operation, evaluating the right-hand side only if the left-hand side is
false
• None of the above
41. In which of the following ways do structures
differ from classes?
Answers:
• Structures cannot
implement interfaces
• Structures cannot
inherit from a base structure
• Structures cannot have
events
• Structures cannot have
overrideable methods
42. Which of the following is not an unboxing
conversion?
Answers:
• Public Sub Sample1(ByVal
o As Object) Dim i As Integer = Cint(o) End Sub
• Public Sub
Sample1(ByVal vt As ValueType) Dim i As integer = Cint(vt) End Sub
• Enum e Hello World End
Enum Public Sub Sample1(ByVal et As System.Enum) Dim e As E = CType(et, E) End
Sub
• Public Interface I
Property Value() As Integer End Interface Public Sub Sample1(ByVal vt As I) Dim
i As Integer = vt.Value EndSub
• Public Class C Private
_value As Integer Public Property Value() As Integer Get Return _value End Get
Set(ByVal value As Integer) _value = value End Set
43. Which of the following operations can NOT be
performed inside a catch block?
Answers:
• Prevention of the
caught exception from leaving the catch block
• Allowing the original
exception to propagate after it has been caught, with all of the information
(including context) intact
• Wrapping the caught
exception inside a newly created exception of a different type
• Generating a new
exception with no information about the original exception
• Alter the Message ,
TargetSite and/or StackTrace, of the existing exception before re-throwing
44. Which of the following events should be used
for assigning a Theme dynamically to a page?
Answers:
• PreInit
• Init
• PreLoad
• PreRender
• Render
45. Which of the following are common methods of
supplying "Help" information to an ASP.NET application?
Answers:
• Setting the ToolTip
property of a control to a string containing the information.
• using the open method
of the browser window object to open a new browser window and display a help
related ASP.NET page
• Using the showHelp
method of the browser window object to display a topic from a compiled help
file (.chm).
• All of the above
46. Which of the following code samples will
cause a compilation error?
Answers:
• Public Class Sample
End Class Public Class Sample(Of T) End Class
• Public Class Sample(Of
T) End Class Public Class Sample(Of T, U) End Class
• Public Class Sample(Of
T As Class) End Class Public Class Sample(Of T As Structure) End Class
• Public Class Sample
End Class Public Class Sample(Of T As Class) End Class
47. Which of the following can Interfaces
contain?
Answers:
• methods
• properties
• fields
• conversion operators
• events
48. Which of the following are true regarding
validation in an ASP.NET application?
Answers:
• Server validation
should only be used when there is no client side validation.
• All data should be
validated on the server side.
• Client Side validation
typically provides a faster response (feedback) time than server validation
• A page can not be
posted back unless all client validation has passed.
49. Which of the following are required to be
true by objects which are going to be used as keys in a System.Collections.HashTable?
Answers:
• They must handle
case-sensitivity identically in both the GetHashCode() and Equals() methods.
• Key objects must be
immutable for the duration they are used within a HashTable.
• Get HashCode() must be
overridden to provide the same result, given the same parameters, regardless of
reference equalityl unless the HashTable constructor is provided with an
IEqualityComparer parameter.
• Each Element in a
HashTable is stored as a Key/Value pair of the type System.Collections.DictionaryElement
• All of the above
50. Which method calls will compile the
following code?
Private Sub Sample(ByVal number As Integer, Optional ByVal bool As
Boolean = True)
End
Sub
Answers:
• Sample(1, True)
• Sample(1)
• Sample(bool:=False)
• Sample(bool:=False,
number:=1)
• Sample(bool:=False, 1)
51. Which of the following are true for
parameters?
Answers:
• Changes to value
parameters always involve making a copy of the original argument
• Items passed as
reference parameters must be initialized prior to the call
• Output parameters do
not need to be assigned inside the method
• Variable length
argument lists are not supported
52. Via which of the following is ViewState
maintained by default?
Answers:
• A hidden variable
within the page that is included with each round tip.
• A cookie which resides
on the client's computer
• A server side
in-process memory cache
• Instance member
variables of the Page class
53. When using the Demand method of
System.Security.IPermission, which of the following will occur?
Answers:
• The permissions of the
code which invoked the Demand method will be evaluated.
• For permissions which
do a stack walk, an exception will occur only if NONE of the calling codes has
the required permission
• For permissions which
do a stack walk, an exception will occur if ANY of the calling codes does not
have the required permission
• The permission levels
of individual stack frames are always checked regardless of the permission
type.
54. Which of the following event you will use if
you want any updates before the server control is rendered to the page?
Answers:
• Load
• LoadComplete
• PreRender
• Init
55. Which of the following are true of using
ADO.NET DataSets and DataTables?
Answers:
• The connection to the
database must remain valid for the life of the data objects
• All tables in a
dataset must come from the same database.
• A given instance of a
DataTable can be in only one DataSet
• Changes made to
multiple tables within a DataSet can easily be transferred to a new DataSet
which contains only the changes
56. In the following example, by which technique
can the method Test in the derived class Cat access the implementation of
MakeNoise in the base class?
Public Class Animal
Public Overridable Sub MakeNoise()
End Sub
End Class
Public Class Cat
Answers:
• Once overriden, the
base class members are inaccessible from the derived class.
• Public Sub Test()
Animal.MakeNoise() End Sub
• Public Sub Test()
MyBase.MakeNoise() EndSub
• Public Sub Test()
CType(Me, Animal).MakeNoise() End Sub
57. What is the result of
Console.WriteLine("{0}:{1}:{2}", CInt(2.5), CInt(1.5), Fix(1.5))?
Answers:
• 2:2:2
• 3:2:2
• 3:2:1
• 2:2:1
58. Which of the following mechanisms are not
suitable for returning a single row from a DataTable containing a large number
of records?
Answers:
• DataTable.Rows.Find
• DataTable.Rows.Select
• DataTable.Select
• Enumerating across
DataTable.Rows
59. Which of the following is/are true about
enums?
Answers:
• Enums are always
equated to an integral constant value
• A variable of the enum
type will always contain one of the declared symbolic constant
• The declared values of
an enum are always assigned a sequential starting with 0
• The declared values of
an enum must be mapped (explicitly or implicitly) to unique integral values
60. The earliest event in which all viewstate
information has been restored is:
Answers:
• Init
• PreLoad
• Load
• PreRender
• Render
61. With which of the following are Declarative
Databinding expressions delimited?
Answers:
• <%# %>
• <%-- --%>
• <!-- -->
• <# >
62. Which of the following is true about
exceptions?
Answers:
• Exceptions should be
derived from System.Exception, but are not required to do so.
• If no catch block is
found for an exception, and the source is not a static constructor, a
System.ThreadException will be thrown
• Mathematical errors
such as divide by zero, or numeric overflow will generate an exception that is
derived from System.Exception
• Every throw statement
must have at least one catch block
63. DateTime Structures is suitable for which of
the following applications?
Answers:
• Applications that work
with dates only.
• Applications that work
with times only.
• Applications that work
with abstract dates and times.
• All of the above
64. Which of the following statements are true
about Passport Authentication?
Answers:
• Passport
authentication allows the users to create a single sign-in name and password to
access any site that has implemented the Passport single sign-in (SSI) service
• Onces implementing the
Passport SSI, you won't have to implement your own user-authentication
mechanism.
• Passport
authentication is a free service for all sites provided by the Microsoft
Corporation.
65. When using Cascading Style Sheets (CSS) to
format output, which of the following is/are true?
Answers:
• Styles can be applied
to all elements having the same CssClass attribute
• Styles can be applied
to specific elements based on their ID attribute
• Styles can be applied
to elements based on their position in a hierarchy
• Styles can be used to
invoke script based code
• All of the above
66. Which of the following accurately describes
the class structure when implementing an ASP.Net page which uses the CodeFile
attribute?
Answers:
• The actual
instantiated class is the class defined in the CodeFile.
• The actual
instantiated class is dynamically created and has a base class defined in the
CodeFile.
• The actual
instantiated class is dynamically created and has a member representing the
class defined in the CodeFile.
• The actual
instantiated class is dynamically created and is a co-class of the class
defined in the CodeFile.
67. Which of the following is/are true regarding
the use of Authentication to control access to the HTML file (.htm .html)?
Answers:
• ASP.NET authentication
can not be used to control access
• ASP.NET authentication
handles these by default in a manner equivalent to .aspx pages
• The extension can be
associated with aspnet_isapi.dll in IIS for the appropriate directory
• A custom HTTP Request
processor must be installed to examine the URL's and determine the appropriate
access rights.
68. Which of the following is a primary
characteristic of the System.Xml.XmlDataDocument?
Answers:
• It provides
synchronized operations viewing the content either as an XmlDocument or as a
DataSet
• It provides the basic
abilities for XMLDocument instances to be created from or exported to DataSets
• It provides a limited
set of capabilities compared to the System.Xml.XmlDocument class
• It provides the basic
abilities to allow DataSets to be loaded from or exported to XML files.
No comments:
Post a Comment