MCQ ASP.NET
Short Description
Usefule MCQ for ASP.NET Interview...
Description
MCQ: ASP.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 3. Can you call SQL Trigger from ASP.NET application explicitly? A. Yes B. No C. None of them ANSWER: B 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 7. A __________ control defaults to displaying the files in the current directory? A. List Box
B. Drive List Box C. Dir List Box D. File List Box ANSWER: D 8. What debugging tools come with the .NET SDK? A. CorDBG – command-line debugger B. Dbg CLR – graphic debugger C. Both A and B D. None of the above ANSWER: C 9. How can you get the ColumnName,DataType ColumnSize, IsKeyColumn,IsAutoIncrement of the table from the dataset? A. GetSchemaTable method of the DataReader B. Fill method of data adaptor C. GetTableDetails method D. Dataset.GetDataTable() ANSWER: A 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 11. what are the Activation modes for .NET Remoting? A. Singleton B. Singlecall C. Both D. None ANSWER: C 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 22. What is the last stage of the Web forms lifecycle? A. Event Handling B. Page_Load C. Validate D. Page_Unload ANSWER : D 23. How does ASP.NET store SessionIDs by default? A. In cache B. In cookies C. In a global variable D. In URL strings or in a database
ANSWER : B 24. Do I need IIS to develop a Web application in ASP.NET 2.0? A. Yes B. No ANSWER : B 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 28. Which of the following contains web application settings? A. app.config B. web.config C. assembly.config D. machine.config ANSWER : B 29. What is default time of expire session? A. 20 minute B. 40 minute C. 100 minute D. 1200 hours ANSWER : A 30. In Which Page Cycle All Controls Are Fully Loaded? A. Page_Load() B. Page_Init()
C. Page_Render() D. Page_Unload() ANSWER : A 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. B. C. D. ANSWER : B 32. What DataType is return in IsPostback property? A. bit B. Boolean C. int D. string 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 34. Which of the following is not a valid statement in ASP.Net? A. Server.Transfer(“SomePage.aspx”); B. Response.Redirect(“SomePage.aspx”); C. Server.Redirect(“SomePage.aspx”); D. Server.Execute(“SomePage.aspx”); ANSWER : C 35. How do you explicitly kill a user’s session ? A. Session.Close() B. Session.Discard() C. Session.Abandon() D. Session.End() ANSWER : C 36. How do you manage states in asp.net application A. Session Objects B. Application Objects C. Viewstate
D. All of the above ANSWER : D 37. Which data control does not exist in asp.net A. GridView B. DataList C. Repeater D. tableView ANSWER : D 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 40. Difference between response.redirect and server.transfer. A. response.redirect will take you to another page with out round trip B. server.transfer will take the round trip from server to client C. all the above D. none of these ANSWER : D 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 42. Which is not a validation control? A. Required Field Validator B. Compare Validator C. Error Validator
D. Regular Expression Validator ANSWER : C 43. When will a session be started in an application? A. Before Application Started B. After Application Started C. When the Client first sends a request to browser D. While closing the application ANSWER : C 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 45. What is the Web.config file used for? A. To store the global information and variable definitions for the application B. Configures the time that the server-side codebehind module is called C. To configure the web server D. To configure the web browser ANSWER : A 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
49. Which of the following is not supported for IIS? A. Windows XP Professional B. Windows XP Home C. Windows 2003 Server D. Windows 2000 Server ANSWER : B 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 52. What’s the difference between Response.Write() and Response.Output.Write()? A.Both are Same B.Write Formatted Output C.Write data to a file D.None Of these ANSWER: B 53. When the page processing cycle of ViewState is available? A. Before init and After Page_Load() / OnLoad() B. Before Page_Load() / OnLoad() and Before Init() C. After Init() and Before Page_Load() / OnLoad() D. After Init() and After Page_Load() / OnLoad() ANSWER: C 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
55. Can you edit data in the Repeater control? A. True B. False ANSWER: A 56. Which template must you provide, in order to display data in a Repeater control? A. EditItemTemplate B. ItemTemplate ANSWER: B 57. What base class do all Web Forms inherit from? A. The Page class. B. The Form class. C. The Session ANSWER: A 58. Assemblies are the building blocks of the .NET framework A. True B. False ANSWER: A 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 60. Can a .NET web application consume Java web service ? A. true B. false ANSWER: A 61. ColumnMapping belongs to System.Data namespaces ? A. true B. false ANSWER: A 62. In order to get assembly info which namespace we should import? A. system.reflection B. System.Collections.Generic C. System.Configuration D. System.assembly ANSWER: A 63. What methods are fired during the page load? A. Unload()
B. PreRender() C. Load() D. All The Above ANSWER: B 64. Ispostback event is generated by the web controls to alert the server to take respected action of the event generated. A. true B. false ANSWER: A 65. The Dataset is an core of connected architecture. A. true B. false ANSWER: B 66. NET DLL contains Very Limited Number Of classes A.true B.false ANSWER: B 67. What is the full form of WSDL A. Web Services Description Language B. Web Services Designing Language C. Windows Services Designing Language D. None of these 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 71. Advantages of WCF over Web Services? (Windows communication Foundation) A. WCF can create services similar in concept to ASMX B. WCF is implemented on pipeline C. WCF is more secure, reliable D. WCF does not have all Http capabilities E. All The Above ANSWER: E 72. what is its lifetime of a Static variable? A. Can Be accessed even Outside of the Program B. Throughout the execution of a program C. Inside a function D. None Of the Above ANSWER: B 73. What is the root namespace for all types? A. Root B. System C. Parent D. Web 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 75. What is a Managed Data ? A. Memory allocation/de-allocation is done by user B. Memory allocation/ de-allocetion is done by CLR itself ANSWER: B 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 77. Application domain is a way in CLR to maintain a boundary between various applications to ensure that they do not interfere in working of any other application.
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 79. Which statements are correct about asp.net AJAX ? A. ASP.NET AJAX is the name of Microsoft’s AJAX solution B. AJAX refers to a set of client and server technologies that focus on improving web development with Visual Studio. C. Microsoft AJAX Library is a JavaScript library that works on a variety of browsers and serves to simplify JavaScript development. D. All The Above ANSWER: D 80. Can We Pass parameter to Crystal Report (.rpt) File ? A. Yes B. No C. None ANSWER: A 81. Which property common in every validation control? A. ValueToCompare B. ValidationExpression C. ControlToValidate D. InitialValue ANSWER: C 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 83. How many types of cookies are there? A. 1 B. 2 C. 3
D. 4 ANSWER: B 84. What’s the .NET collection class that allows an element to be accessed using a unique key? A. List B. HashTable C. ArrayList D. Arry ANSWER: B 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 89. Which of the following is TRUE about Windows Authentication in ASP.NET? A. Automatically determines role membership B. Role membership determined only by user programming C. ASP.NET does not support Windows Authentication D. All of the Above ANSWER: A 90. What are WebMethod attribute properties A. [WebMethod(EnableSession ="true")]
B. [WebMethod(MessageName = "SinInt")] C. [WebMethod(TransactionOption = "Supported")] D. [WebMethod(CacheDuration = "180")] E. All The Aboue ANSWER: E 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 92. Team foundation is a ________ tier architecture A. One B. Two C. Three D. None ANSWER: C 93. Is it possible to inline assembly or IL in C# code? A. Yes B. No ANSWER: B 94. Is it possible to have a static indexer in C? A. Yes B. No ANSWER: B 95. In an ASP.NET application, can we add more than one WEB.CONFIG files. Can it run? A. Yes B. No ANSWER: A 96. Can we run asp.net application without WEB.CONFIG file? 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 101. Is it possible to Override Private Virtual methods. A. Yes B.No ANSWER: B 102. The default size cache of a 128mb RAM is 128mb 384mb 3.256mb 512mb ANSWER: C 103. Does web service have a state? A. Yes B. No ANSWER: A 104. What is the maximum size of query string? A. 384 bytes B. 128 bytes C. 255 bytes D. 512 bytes
ANSWER: C 105. Which Namespace is used for event log support? A. System.Reflection; B. System.Diagnostics C. System.Collections D. System.Web.UI 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 107. How many classes can a single .NET DLL contain? A. One B. Two C. Three D. Many ANSWER: D 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 109. Web Controls Supports CSS A. True B. False ANSWER: A 110. There can be more than 1 machine.config file in a system A. True B. False ANSWER: A 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 112. What is the extension of a web user control file ? A. .asmx B. .ascx C. .aspx ANSWER: A 113. Which of the following is not a member of ADODBCommand object-? A. ExecuteReader B. ExecuteScalar C. ExecuteStream D. Open E. CommandText ANSWER: D 114. What does Response.End will do? A. It will stop the server process B. It will stop the client process C. None of the above ANSWER: A 115. How do you add ASP.Net 3rd party component? A. By add/Remove items in the project menu B. Add reference of dll file and place the code where ever required C. Cannot add 3rd party component to asp.net ANSWER: B 116. What is a diffgram ? A.The one which renders the dataset object contents to XML B.Finds the difference in two objects C.Finds the difference in two files D.None of the above ANSWER: B 117. Which of the following extension does a webservice file will have? A. .asmx B. .aspx C. .ascx D. .resx ANSWER: A 118. Select the caching type supported by ASP.Net A. Output Caching B. DataCaching
C. Both a & b D. None of the above ANSWER: C 119. How do you trace the application_End event on runtime? A. By Debugging B. By Tracing C. Can not be done ANSWER: C 120. Which of the following is true ? A. User controls are displayed correctly in the Visual Studio .NET Designer B. Custom controls are displayed correctly in VS.Net Designer C. User and Custom controls are displayed correctly in the Visual Studio .NET Designer. ANSWER: B 121. Where is the default Session data is stored in ASP.Net? A. InProcess B. StateServer C. SQL Server D. All of the above 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 123. What is the default authentication mode for IIS? A. Windows B. Anonymous C. Basic Authentication D. None ANSWER: B 124. Can a dll run as stand alone application ? A. No B. Yes C. Sometimes we can make it by introducing some code 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 127. How do you register a user control? A. Add Tag prefix, Tag name B. Add Source, Tag prefix C. Add Src, Tagprefix, Tagname ANSWER: C 128. Is it Possible to Serialize HashTable with XMLSerializer? A. Yes B. No 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 130. The object used by SQL connection to make Security Demands A. SQLLCientAttribute B. SQLPermission C. SQLPermissionClient D. SQLClientPermission ANSWER: D 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
132. The number of forms that can be added to a aspx page is A. 2 B. 3 C. 1 D. More than one ANSWER: C 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 136. On which of the operating system below ASP.NET can run? A. Windows XP Professional B. Windows 2000 C. Both A) and B) D. None of the Above ANSWER: C 137. Which of the following is true about session in ASP.NET? A. ASP.NET automatically delete sessions after configurable timeout interval
B. Programmers has to take care of delete sessions after configurable timeout interval C. The default time interval is 5 minutes D. None of the Above ANSWER: A 138. In ASP.NET if one uses Windows authentication the current request attaches an object called as A. Serialization B. WindowsPrincipal C. WindowDatset D. None of the Above ANSWER: B 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 140. In ASP.NET what does the following return < % Response.Write(System.Environment.WorkingSet.ToString())%> A. Gives the memory working set B. Return Null value C. Gives Error D. Gives Error ANSWER: A 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 142. In ASP.NET if one wants to set the focus on a particular control A. Call SETFOCUS B. Call SETCONTROL C. Call FOCUS method D. None of the above ANSWER: C 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 144. Which of the following can be used to debug .NET application? A. Visual Studio .NET B. Runtime Debugger C. Systems.Diagnostics classes D. All the Above ANSWER: D 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 147. Which of the following denote page code model in ASP.NET? A. single-file B. code-behind C. Both A and B D. None of the above ANSWER: C 148. If a developer of ASP.NET defines style information in a common location. Then that location is called as A. Master Page B. Theme C. Customization D. None of the Above ANSWER: B 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. section C. 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 158. In ASP.NET application the Global.asax file lie in which directory A. ROOT B. System C. Application 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 170. Forms based authentication is otherwise called in ASP.NET as Cookie Authentication because Forms authentication uses cookies to allow applications to track users throughout their visit A. Cookie Authentication B. Passport Authentication C. Windows Authentication 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 175. The .NET Framework provides a runtime environment called A. RMT B. CLR C. RCT D. RC ANSWER: B 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 182. Which of the following is FALSE? A. ASP.NET applications run without a Web Server B. ASP+ and ASP.NET refer to the same thing C. ASP.NET is a major upgrade over ASP D. None of the Above
ANSWER: D 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 184. Which of the following allow writing formatted output? A. Response.Write() B. Response.Output.Write() C. Both A) and B) D. None of the Above ANSWER: B 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 194. List the types of Authentication supported by ASP.NET. A. Windows (default) B. Forms C. Passport
D. None (Security disabled) E. All of the above ANSWER: E 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 196. The actual work process of ASP.NET is taken care by A. inetinfo.exe B. aspnet_isapi.dll C. aspnet_wp.exe 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 198. The type of code found in Code-Behind class is A. Server-side code B. Client-side code C. Both A and B 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 200. In ASP.NET the sessions can be dumped by using A. Session.Dump B. Session.Abandon C. Session.Exit D. None of the Above
ANSWER: B 201. Which of the following is not true about ADO.NET? A. ADO.NET enables to create distributed data sharing applications B. ADO.NET uses XML to transfer data across applications and data source C. ADO.NET doesn't support disconnected architecture D.The classes of ADO.NET are defined in the System.Data namespace ANSWER: C 202. Which of the following illustrates the benefit of ADO.NET? A. Interoperability B. It uses DataSet to represent data in memory that can store data from multiple tables and multiple sources. C. Disconnected data access D.All of above ANSWER: D 203. Which of the following is the object of .NET data provider? A. Connection B. Command C. Data Reader D. All of 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 205. When you create a relationship between tables in ADO.NET DataSet A. a UniqueConstraint is added to the parent table B. a ForeignKeyConstraint is added to the child table by default C. Both 1 and 2 D. NONE ANSWER: C 206. Which of the following is not true for ADO.NET DataSet? A. DataSet provides a disconnected view of a data source. B. Dataset enables to store data from multiple tables and multiple sources C. We can create relationship between the tables in a DataSet. D. All of above are true ANSWER: D 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 209. Which of the following is not the method of DataAdapter? A. Fill B. FillSchema C. ReadData D. Update ANSWER: C 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 nonexistent 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 218. Which of the following is a DataView method? A. Add B. Remove C. Find D. All the above ANSWER: C 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 222. Base class for LINQ to SQL is A. DataContext B. DataSet C. Data.SqlClient D. None ANSWER: A 223. Which web server control cannot be both either databound or unbound? A. Dropdownlist B. ListBox C. GridView D. ALL ANSWER: C 224. Which of the following doesnot come with .NET 3.0 A. WCF B. WPF C. WF D. TFS ANSWER: D
225. MVC stands for A. model view control B. modern view control C. model vast control D. model view coupling ANSWER: A 226. Which of the following is associated with freeing of memory? A. System.Data D. System.DirectoryServices C. System.gc.collect D. System.Drawing.Color ANSWER: C 227. Web methods are part of A. Web services B. Web site C. Web application D. WPF application. ANSWER: A 228. WAS stands for A. Windows Action Server B. Windows Activation Server C. Web application services D. Web activation server ANSWER: B 229. WCF service can be hosted in A. Console application B. WAS C. Both D. None 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 231. How many application blocks ate there in enterprise library? A. 5 B. 3 C. 12 D. 8 ANSWER: D 232. Which application block type is not present in enterprise library? A. Caching B. Exception C. Performance D. Logging ANSWER: C 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 234. .NET application cannot be developed using A. C# B. VB C. VJ# D. Python ANSWER: D 235. A WCF service can be accessed through A. HTTP C. TCP\IP C. MSMQ D. All the above channels ANSWER: D
View more...
Comments