Professional Documents
Culture Documents
MCQ Asp Net
MCQ Asp Net
Net
1. In order for query string values to be available during page processing, you must
submit the page using an HTTP GET command.
A. True
B. False
ANSWER: A
2. In order for hidden-field values to be available during page processing, you must
submit the page using an HTTP POST command.
A. True
B. False
ANSWER: A
4. What is the name of the property of ASP.NET page that you can query to determine
that a ASP.NET page is being requested not data being submitted to web server?
A. FirstGet
B. Initialized
C. IncludesData
D. IsPostBack
ANSWER : D
5. For separating server-side code from client-side code on a ASP.NET page, what
programming model should you use?
A. Separation model
B. Code-Behind model
C. In-Line model
D. ClientServer model
ANSWER: B
6. Which of the following operations can you NOT perform on an ADO.NET DataSet?
A. A DataSet can be synchronised with the database.
B. A DataSet can be synchronised with a RecordSet.
C. A DataSet can be converted to XML.
D. You can infer the schema from a DataSet.
ANSWER: B
10. Which of the function is used to check textbox only contain number?
A. char.IsDigit
B. char.IsLetter
C. char.IsNumber
D. char.IsLetterOrDigit
ANSWER: A
12. How can you come out from the c# windows Forms Application?
A. Application.Exit();
B. Application.close();
C. Form.Exit();
D. Form.Close();
ANSWER: A
13. You have designed a logon form with two TextBox controls named txtUserName
and txtpassword. You want to ensure that the user can enter only lowercase
characters in the controls. Which of the following solutions will fulfill this
requirement using the simplest method?
A. Program the KeyPress event of the TextBox controls to convert uppercase letters to
lowercase letters.
B. Create a single event handler that is attached to the KeyPress event of the form.
Program this event handler to convert the uppercase letters to lowercase ones.
C. Set the CharacterCasing property of the Textbox controls to Lower.
D. Use the CharacterCasing method of the controls to convert the letters to lowercase
letters.
ANSWER: C
14. You are creating an order-tracking application using a Visual C# .NET Windows
application. When you are unable to track a particular order number entered by the
user, you need to raise an exception. Which of the following options will help you to
raise an exception?
A. try block
B. catch block
C. finally block
D. throw statement
ANSWER: D
15. Which of the following events will fire when the Insert key is pressed?
A. KeyDown
B. KeyPress
C. KeyUp
D. KeyDown,KeyPress
ANSWER: D
16. You have a TextBox control and a Help button that the user can press to get help on
allowable values. You validate the data entered by the user in the TextBox control.
If the user enters an invalid value, you set the focus back in the control using the
Cancel property of the CancelEventArgs. A user reports that once he enters invalid
data in the text box, he cannot click the Help button. What should you do to correct
the problem?
A. Set the CausesValidation property of the text box to false.
B. Set the CausesValidation property of the text box to true.
C. Set the CausesValidation property of the Help button to false.
D. Set the CausesValidation property of the Help button to true.
ANSWER: C
17. You are designing a Windows Form that enables you to add a new product to the
product catalog of your company. You need to validate the controls as the user
enters the data. If incorrect data is entered in the field, you should set the focus back
to the control and ask the user to enter the correct data. Which of the following
events will you use to validate user input?
A. LostFocus
B. Validating
C. Leave
D. Validated
ANSWER: B
18. You are designing a Windows Form that enables you to add a new product to the
product catalog of your company. You need to validate the controls as the user
enters the data. If incorrect data is entered in the field, you should set the focus back
to the control and ask the user to enter the correct data. Which of the following
events will you use to validate user input?
A. LostFocus
B. Validating
C. Leave
D. Validated
ANSWER: B
19. In order for query string values to be available during page processing, you must
submit the page using an HTTP GET command.
A.True
B. False
ANSWER: A
20. In order for hidden-field values to be available during page processing, you must
submit the page using an HTTP POST command.
A. True
B. False
ANSWER: A
21. A project on which you are working calls for you to store small amount of
frequently changing information about a page on the client.For this project, security
is not a worry. Which is the best method to use?
A. A cookie
B. A query string
C. A URL
D. A hidden form field
ANSWER : D
25. What namespace does the Web page belong in the .NET Framework class
hierarchy?
A. System.Web.Control
B. System.Web.RootBuilder
C. System.Web.UserControl
D. System.Web.UI.Page
ANSWER : D
26. Where would you define application and session level events?
A. Global.asax
B. Default.aspx
C. Web.Config
D. General.aspx
ANSWER : A
27. What attribute must be set on a validator control for the validation to work?
A. Validate
B. ValidateControl
C. ControlToBind
D. ControlToValidate
ANSWER : D
31. The public methods and properties of a master page can be accessed in a content
page by assigning a class name to the master page. Which directive can be used to
assign a class name to the master page?
A. <%@ Control %>
B. <%@ Master %>
C. <%@ MasterType %>
D. <%@ Page %>
ANSWER : B
33. Which method do you invoke on the Data Adapter control to load your generated
dataset?
A. Fill( )
B. Read( )
C. ExecuteQuery( )
D. None of these
ANSWER : A
38. Which control would you use if you needed to make sure the values in two different
controls matched?
A. Required Field Validator
B. Custom Validator control
C. CompareValidator control
D. Regular expression validator Control
ANSWER : C
39. Which property on a Combo Box do you set with a column name, prior to setting
the DataSource, to display data in the combo box?
A. DataTextField property.
B. DataValueField Property
C. DataMember
D. None of these
ANSWER : A
41. You have created a new ASP.Net web application. You build the solution in Visual
Studio .Net. You notice that there is a /bin directory under the virtual directory.
Which type of files should you place in this location?
A. Assemblies that are used on only this one web application
B. Assemblies that are used on web sites on only this web server machine.
C. Assemblies that are used by web applications anywhere on the network
D. Assemblies that are XCOPY’d to the location.
ANSWER : A
44. Which control is used to sort the data and allow paging?
A. Datalist
B. Repeater Control
C. DataGrid
D. None of these
ANWER : C
46. Which are the two properties of a Datagrid that has to be specified to turn on
sorting and paging respectively?
A. EnableSorting=”true” and EnablePaging=”true”
B. DisableSorting=”false” and DisablePaging=”false”
C. AllowSoring=”true” and allowPaging=”true”
D. EnableSorting=”true” and allowPaging=”true”
ANSWER : C
47. What is used to validate complex string patterns like an e-mail address?
A. Extended expressions
B. Regular expressions
C. Irregular expressions
D. Basic expressions
ANSWER : B
48. Which namespace is used when we connect our asp.net page to sql server
A. System.data.sqlclient
B. System.data.sql
C. System.sqlserver
D. System.url
ANSWER : A
50. The process in which a web page sends data back to the same page on the server is
called?
A. PostBack
B. Session
C. Query strings
D. All the above
ANSWER : A
51. After capturing the SelectedIndexChanged event for a ListBox control, you find
that the event handler doesn’t execute. What could the problem be?
A. The AutoEventWireup attribute is set to False
B. The AutoPostBack attribute is set to False
C. The codebehind module is not properly compiled
D. The ListBox must be defined WithEvents
ANSWER : B
54. Which method do you invoke on the DataAdapter control to load your generated
dataset with data?
A. DataBind()
B. Populate()
C. Bind
D. Fill()
ANSWER: D
59. HTML controls are run on client side, where as ASP.net controls runs on server side
and for execute on client side, they generate HTML controls.
A. TRUE
B. FALSE
ANSWER: A
68. Setting a permanent cookie is not like Session cookie, It is Specially used for
particular Scenario.
A. True
B. false
ANSWER: B
69. A process where items are removed from cache in order to free the memory based
on their priority.
A. CachePriority
B. CacheElementPriority
C. CacheItemPriority
D. None Of The Above
ANSWER: C
70. A process where items are removed from cache in order to free the memory based
on their priority is called page posting.
A. true
B. False
ANSWER: B
74. An abstract class is one in which methods are defined but an object of this class
cannot be instantiated. This type of a class can only be derived but cannot be
instantiated.
A. true
B. false
ANSWER: A
76. Viewstate is the mechanism that automatically saves the values of the page's items
just after rendering the page. It stores items added to a page’s ViewState property
as hidden fields on the page.
A. True
B. false
ANSWER: B
A. True
B. False
ANSWER: A
78. Singleton architecture is to be used when all the applications have to use or share
same data.
A. True
B. False
ANSWER: A
82. An organization has developed a web service in which the values of the forms are
validated using ASP.NET application.Suppose this web service is got and used by a
customer then in such a scenario which of the following is TRUE
A. The customer must be having technology that run ASP.
B. Such a situation cannot happen at all
C. The customer can run on any platform.
D. None of the Above
ANSWER: A
85. What’s the top .NET class that everything is derived from?
A. System.Object
B. System
C. System.Data
D. System.net
ANSWER: A
86. What is the event that is fired when an unhandled exception is encountered within
the application?
A. Page_Error
B. Application_Error
C. Application_Disposed
D. System_Error
ANSWER: B
87. If cookies are not enabled at browser end does form Authentication work?
A. Yes
B. No
C. Both Yes And NO
D. None of the above
ANSWER: B
88. Can you prevent your class from being inherited by another class?
A. Yes
B. No
ANSWER: A
91. You are developing an asp.net page for www.abc.com , in that page you need to
provide an option to redirect to a web page that is in www.def.com. Which method
you should use to perform the task
A. Server.Transfer()
B. Response.Redirect()
C. Response.Transfer()
D. Request.Redirect()
ANSWER: D
95. In an ASP.NET application, can we add more than one WEB.CONFIG files. Can it
run?
A. Yes
B. No
ANSWER: A
97. Caching is considered as the best way to enhance the performance of the
application.
A. Yes
B. No
ANSWER: A
98. The main event fired when we call bind method in a datagrid
A. First: GridView_DataBinding , Then, GridView_RowCreated
B. First:GridView_RowCreated, Then,GridView_DataBinding
C. GridView_DataBinding
D. First: GridView_DataBinding , Then, GridView_RowCommand
ANSWER: A
99. Which are the components of a strong name?
A. Name of the assembly
B. version number
C. Culture identity
D. public key token.
E. All of these
ANSWER: E
100. To test a Web service you must create a windows application or Web application to
consume this service?
A. True
B. False
ANSWER: B
106. Where do you store the information about the user’s locale?
A. System.Web.UI
B. System.Web.UI.Page.Culture
C. System.Web.UI.Page
D. System.Web
ANSWER: B
108. What is the transport protocol you use to call a Web service?
A. HTTP
B. SMTP
C. TCP
D. SOAP
E. POP
ANSWER: D
111. what is the difference between user control and custom control
A. Both can use as drag and drop tool
B. Both are same
C. Both can use different application
D. One Custom Control can be use in different project but not the same with User control
ANSWER: D
117. Which of the following extension does a webservice file will have?
A. .asmx
B. .aspx
C. .ascx
D. .resx
ANSWER: A
122. Which of the following languages can be used to write server side scripting in
ASP.NET?
A. C#
B. C
C. Visual Basic
ANSWER: A
125. The code will be processed on web server when the runat attribute of the < Script >
tag has the following value?
A. Desktop
B. Client
C. Server
ANSWER: C
126. What is the difference between HTTP handlers & HTTP modules?
A. Httphandler is an class and Httpmodule is an assembly
B. Httphandler is an event handler and httpmodule is module to do some task
C. Both of the above
D. None of the above
ANSWER: A
129. What is the advantage of Disconnected mode of ADO.Net in ASP.Net(user data can
update and retrieve in dataset and when connection connected, update values with
server)
A. Automatically dump data at client PC
B. Not necessary to connect with server
C. user data can update and retrieve in dataset and when connection connected, update
values with server
D. All of the above
ANSWER: C
131. How do you turn off the Session state for a webform ?
A. In Web.config file set the tag to True
B. In Web.config file set the tag to false
C. Set the Session state to false in webform properties window
D. Set the EnableSession state to false in webform properties window
ANSWER: D
133. Select the output of the statement < form method=post action=”test.aspx” >
A. Transfers all the form data to test.aspx with HTTP headers
B. Transfers all the form data to test.aspx with out HTTP headers
C. Calls post method on test.aspx
D. None of the above
ANSWER: B
134. You are transferring records from one database to another. You need to decide
whether you can use the SqlBulkCopy class to transfer the records. What should
you do?
A. Ensure that the source database is Microsoft SQL Server.
B. Ensure that the destination database is Microsoft SQL Server.
C. Ensure that the column names in the source table match the column names in the
destination
D. table.
E. Ensure that the bulk copy program (bcp) utility is installed on the destination server.
ANSWER: B
135. You are creating a Web application that will run on an intranet. The Web
application reads comma-delimited text files. The text files reside in a subdirectory
below the Web application's root directory. Users must not be able to navigate
directly to these files in a Web browser unless they are members of the Accounting
role. You need to write an ASP.NET HTTP handler that will use the
FileAuthorizationModule class. Which form of authentication should you use?
A. Anonymous
B. Certificate
C. Forms
D. Microsoft Windows Integrated Security
ANSWER: 4
139. In ASP.NET if one wants to maintain session then which of the following is used?
A. In-process storage
B. Session State Service
C. Microsoft SQL Server
D. All the Above
ANSWER: 4
141. Give one word: What model does ASP.NET request processing is based on
A. Pipeline
B. Waterfall
C. Top-down
D. Bottom-up
ANSWER: A
143. In ASP.NET page framework an automatic way to associate page events and
methods is
A. AutoEventWireup attribute of the Page directive is set to true
B. AutoEventWireup attribute of the Page directive is set to False
C. It is not possible to set automatically page events and methods
D. None of the Above
ANSWER: A
145. If one uses ASP.NET configuration system to restrict access which of the following
is TRUE?
A. The access is restricted only to ASP.NET files
B. The access is restricted only to static files and non-ASP.NET resources.
C. Both A and B
D. None of the Above
ANSWER: A
146. The control used in ASP.NET to display information from data set but with better
formatting and editing behavior is
A. Panel
B. Button
C. DataList
D. None of the Above
ANSWER: C
149. You create a Web site. The Web site has many predefined roles and associated
users that will be used for security purposes. You need to manage these roles and
user accounts.Which tool should you use?
A. the Microsoft .NET Framework Configuration tool
B. the Code Access Security Policy tool
C. the ASP.NET IIS Registration tool
D. the Web Site Administration Tool
ANSWER: D
150. You are creating a templated Web control for use in your Web application. You
need to add the Web control to your Web application pages without compiling your
control into a .dll file. What should you do?
A. Ensure that the Web control inherits from the WebControl class.
B. Ensure that the Web control inherits from the Control class.
C. Ensure that the Web control inherits from the CompositeControl class.
D. Ensure that the Web control inherits from the UserControl class.
ANSWER: D
151. You are creating a custom control. The UI of the control must contain several text
boxes and two buttons. The control must be available in the global assembly cache
for reuse across multiple Web applications. You need to achieve this functionality
by using the minimum amount of code. What should you do?
A. Create a control that derives from System.Web.UI.Control.
B. Create a control that derives from System.Web.UI.WebControls.CompositeControl.
C. Create a control that derives from System.Web.UI.WebControls.WebControl.
D. Create a control that derives from System.Web.UI.UserControl.
ANSWER: B
152. ASP.NET separates the HTML output from program logic using a feature named
as
A. Exception
B. Code-behind
C. Code-front
D. Code-front
ANSWER: C
153. Which of the following is used to write error message in event Log File?
A. System.Diagnostics
B. System.EnterpriseServices
C. System.Data
D. None of the Above
ANSWER: A
154. To set page title dynamically in ASP.NET which of the following is used?
A. < head > section
B. <tail > section
C. <sheet > section
D. None of the above
ANSWER: A
155. 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
A. WebPartManager
B. ProxyWebPartManager
C. System.Activator
D. None of the Above
ANSWER: B
156. Setting the following properties for object in ASP.NET results in Response.Buffer =
True Response.ExpiresAbsolute = Now().Subtract(New TimeSpan(1, 0, 0,
0))Response.Expires = 0 Response.CacheControl = "no-cache
A. The session expires
B. Clears the buffer area
C. Avoid page to be cached
D. None of the Above
ANSWER: C
157. A client side already has 25 COM objects and if the requirement is to add a 26th
function that must exists only for .NET object without affecting the existing one how
to achieve the above?
A. By CCW
B. By RCW
C. By RCA
D. None of the Above
ANSWER: A
159. The feature in ASP.NET 2.0 that is used to fire a normal postback to a different
page in the application is called
A. Theme
B. Cross Page Posting
C. Code-front
D. None of the above
ANSWER: B
160. Which of the following denote value that can be taken by Cache-Control of
ASP.NET?
A. Public
B. Private
C. no-cache
D. All the Above
ANSWER: D
161. You have a Web application that is configured for personalization. You need to
access personalization data from one of the pages of the Web application by using
the minimum amount of administrative effort. What should you do?
A. Access the personalization data from the Session property of the HttpContext object.
B. Access the personalization data from the Application property of the HttpContext
object.
C. Access the personalization data from the Cache property of the HttpContext object.
D. Access the personalization data from the Profile property of the HttpContext object.
ANSWER: D
162. You develop a Web application that contains two master pages. You need to
dynamically set the master page when a user views pages in the application. What
should you do?
A. Set Page.MasterPageFile in the Page's Page_Init event.
B. Set Page.MasterPageFile in the Page's OnInit event.
C. Set Page.MasterPageFile in the Page's Page_Load event.
D. Set Page.MasterPageFile in the Page's Page_PreInit event.
ANSWER: D
163. You create a Web Form. You need to add controls that use adaptive rendering to
display content.The type of content rendered must depend on the device that is
requesting the page. What are two possible ways to achieve this goal? (Each correct
answer presents a complete solution. Choose two.)
A. Add custom controls that emit XHTML to the Web Form.
B. Add custom controls that emit WML to the Web Form.
C. Add mobile controls to the Web Form.
D. Add Web server controls to the Web Form.
ANSWER: C,D
164. You create a large, n-tier Web application that has a custom event tracking system.
You need to create a custom event type that enables your event tracking system to
record all relevant event details for all types of events. The events must be stored in
Microsoft SQL Server. From which base type should your custom event type
inherit?
A. IWebEventCustomEvaluator
B. WebEventProvider
C. WebBaseEvent
D. WebAuditEvent
ANSWER: C
165. The GridView control in ASP.NET has which of the following features
A. Automatic data binding
B. Automatic paging
C. Both A) and B)
D. None of the above
ANSWER: C
166. If in an ASP.NET application one want to create http handlers which of the
interface is used
A. IHttpHandlerFactory
B. Handler
C. Pipeline
D. None of the above
ANSWER: A
167. I have an ASP.NET application. I have a page loaded from server memory. At this
instance which of the following methods gets fired
A. PreRender( )
B. Load()
C. Unload( )
D. None of the Above
ANSWER: B
168. Which of the following denote the web control associated with Table control
function of ASP.NET?
A. DataList
B. ListBox
C. TableRow
D. All the Above
ANSWER: C
169. A developer wanted to achieve graphics in his display using ASP.NET. Which of
the following web controls are available in ASP.NET to achieve the above?
A. AdRotator
B. LinkButton
C. Both A and B
D. None of the Above
ANSWER: A
171. Which of the following denote New Data-bound Controls used with ASP.NET
A. GridView
B. FormView
C. SqlDataSource
D. Both A) and B)
E. All the Above
ANSWER: E
172. You are working with a team of developers on a Web site. You copy the Web site
from the staging server to work on it locally. While making changes, you create new
C# source code files and delete old ones. You need to ensure that your changes
propagate to the staging server without affecting any files that you have not
modified. Which tool should you use?
A. XCOPY
B. the Copy Web tool
C. the Publish Web tool
D. a Web Setup project
ANSWER: B
173. Your team creates a Web site. The Web site needs to be deployed to a staging
server for performance testing. You plan to make a number of performance
enhancements and then retest.You need to compile and copy the Web site to the
staging server. What should you do?
A. Write a batch file that uses aspnet_compiler.exe.
B. Write a batch file that uses InstallUtil.exe.
C. Write a batch file that uses Csc.exe.
D. Write a batch file that uses aspnet_wp.exe.
ANSWER: A
174. In ASP.NET the < authorization > section contain which of the following elements
A. < allow >
B. < deny >
C. Both A and B
D. None of the Above
ANSWER: C
176. Give One word: Common type system is built into which of the following
A. CLR
B. RCT
C. RCW
D. GAC
ANSWER: A
177. Find the term: The .NET framework which provides automatic memory
management using a technique called.
A. Serialization
B. Garbage Collection
C. Assemblies
D. Overriding
ANSWER: B
178. In my .NET Framework I have threads. Which of the following denote the possible
priority level for the threads?
A. Normal
B. AboveNormal
C. Highest
D. All the Above
ANSWER: D
179. The technique that allow code to make function calls to .NET applications on other
processes and on other machines is
A. .NET Threading
B. .NET Remoting
C. .NET RMT
D. .None of the above
ANSWER: B
180. Which of the following denote the property in every validation control?
A. ControlToValidate property
B. Text property
C. Both A and B
D. None of the Above
ANSWER: C
181. What is the base class from which all Web forms inherit?
A. Master Page
B. Page Class
C. Session Class
D. None of the Above
ANSWER: B
183. What tags one need to add within the asp:datagrid tags to bind columns manually.
A. Set AutoGenerateColumns Property to false on the datagrid tag
B. Set AutoGenerateColumns Property to true on the datagrid tag
C. It is not possible to do the operation
D. Set AutomaunalColumns Property to true on the datagrid tag
ANSWER: A
185. Which of the following must be done in order to connect data from some data
resource to Repeater control?
A. Set the DataSource property
B. Call the DataBind method
C. Both A and B
D. None of the Above
ANSWER: C
186. The namespace within the Microsoft .NET framework which provides the
functionality to implement transaction processing is
A. System.EnterpriseServices
B. System.Security
C. System.Diagnostics
D. System.Data
ANSWER: A
187. You are deploying a Web site to a server managed by a hosting company. The only
access you have to the server is through FTP. You need to precompile and deploy
the Web site without its source files. What should you do?
A. Use the Copy Web tool.
B. Use the Publish Web tool.
C. Use XCOPY.
D. Use the Web Setup project Installer.
ANSWER: B
188. GIVE ONE WORD: In .NET the operation of reading metadata and using its
contents is known as
A. Reflection
B. Enumeration
C. Binding
D. Serialization
ANSWER: A
189. Which of the following transfer execution directly to another page?
A. Server.Transfer
B. Response.Redirect
C. Both A and B
D. None of the Above
ANSWER: A
190. If one has two different web form controls in a application and if one wanted to
know whether the values in the above two different web form control match what
control must be used?
A. DataList
B. GridView
C. CompareValidator
D. Listview
ANSWER: C
191. Suppose one wants to modify a SOAP message in a SOAP extension then how this
can be achieved. Choose the correct option from below
A. One must override the method ReceiveMessage
B. One must override the method InitializeMethod
C. Both A and B
D. One must override the method ProcessMessage
ANSWER: A
192. Suppose a .NET programmer wants to convert an object into a stream of bytes
then the process is called
A. Serialization
B. Threading
C. RCW
D. AppDomain
ANSWER: A
193. Which of the following method is used to obtain details about information types of
assembly?
A. GetTypes
B. GetType
C. Both A and B
D. None of the Above
ANSWER: C
195. Which of the following is used to send email message from my ASP.NET page?
A. System.Web.Mail.MailMessage
B. System.Web.Mail.SmtpMail
C. Both A and B
D. None of the Above
ANSWER: C
197. Which of the following can be used to add alternating color scheme in a Repeater
control?
A. AlternatingItemTemplate
B. DataSource
C. ColorValidator
D. None of the Above
ANSWER: A
199. Which of the following denote ways to manage state in an ASP.Net Application?
A. Session objects
B. Application objects
C. ViewState
D. All the Above
ANSWER: D
204. DataAdapter object populates a DataSet and resolves updates with the data source.
Yes or No?
A. Yes
B. No
ANSWER: A
207. Which of the following method of the command object is best suited when you have
aggregate functions in a SELECT statement?
A. ExecuteScalar
B. ExecuteReader
C. ExecuteNonQuery
D. NONE
ANSWER: A
208. Which of the following is the event that is exposed by the DataTable object?
A. RowChanged
B. ColumnChanged
C. RowChanging
D. All of above
ANSWER: D
210. Which of the following is the method provided by the DataSet object to generate
XML?
A. ReadXML
B. WriteXML
C. GetXML
D. All of above
ANSWER: D
211. To perform asynchronous data access, what must be added to the connection
string?
A. BeginExecute=true
B. MultiThreaded=true
C. MultipleActiveResultSets=true
D. Asynchronous=true
ANSWER: D
212. You are working with a DataSet and want to be able to display data, sorted
different ways. How do you do so?
A. Use the Sort method on the DataTable object.
B. Use the DataSet object’s Sort method.
C. Use a DataView object for each sort.
D. Create a DataTable for each sort, using the DataTable object’s Copy method, and then
Sort the result.
ANSWER: C
213. Which method is used to Get a value indicating whether the column contains non-
existent or missing values?
A. GetType()
B. IsDBNull ()
C. GetValues ()
D. All the above
ANSWER: B
214. To improve the performance and scalability of your .NET application. Which one
of the following techniques would help?
A. Connection Strings
B. Connection Pooling
C. SQL Injection
D. Data Adapter
ANSWER: B
215. Which method is used to commit all changes in the DataSet or DataTable?
A. Update()
B. AcceptChanges()
C. GetChanges()
D. None
ANSWER: B
216. By default, the pooling property with connection string is set as True/False
A. True
B. False
ANSWER: A
217. Between Windows authentication and SQL Server Authentication, SQL Server
authentication is the trusted one.
A. True
B. False
ANSWER: B
219. There are two classes named TEACHER and STUDENTS.When TEACHER goes
out of the class,STUDENTS should make noise.The scemario best befits to the
concept of "association of two classes behavior-where one class watches another
class for a behavior change and triggers an action from inside itself based on the
behavior change".Which pattern of design it could be?
A. Singleton patter
B. Template pattern
C. Observer pattern
D. None
ANSWER: C
220. An e-shopping web portal has a shopping basket control where the list of available
items meant for shopping is displayed.The item list remains unchanged for all users
irrespective of scenerios and it always populates from a database look up table every
time when the page is loaded.For getting better performance and memory
effectiveness,it is appropriate to store the data in
A. Session
B. Cache
C. Server registry
D. All
ANSWER: B
221. For a web application, I want to store user's login information and also some static
information relevant to be shared to all users. I can
A. Store user info in Cache and static info in Session
B. Store user info in Session and static info in Cache
C. Store both in Session
D. Store both in Cache
ANSWER: B
223. Which web server control cannot be both either databound or unbound?
A. Dropdownlist
B. ListBox
C. GridView
D. ALL
ANSWER: C
230. I have an interface called Computation which has three methods add(),print() and
execute().I am implementing Computation to an abstract class called Execution
where I provide some definition for the abstract execute() alone. I provided
definition to execute() only because I want everybody inheriting the class to have my
execute() only and not their own definition for it. Now, I expose the Execution class
to three parties who can now inherit the class and provide their definition to add()
and print() and simply call the parent execute().After implementation by the three
parties, their three classes are integrated back to the project and now the end
user\runtime decides which class to be loaded for processing. This scenario is a
typical example for
A. Factory pattern
B. Abstract factory pattern
C. Singleton pattern
D. Observer pattern
ANSWER: B
233. Which of the following cannot be used for navigating to a new web page?
A. Response.write
B. Response.Redirect
C. Server.Transfer
D. Server.Execute
ANSWER: A