mcq asp.net

49
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

Upload: actcool123

Post on 28-Oct-2015

1.145 views

Category:

Documents


21 download

DESCRIPTION

Usefule MCQ for ASP.NET Interview

TRANSCRIPT

Page 1: MCQ ASP.NET

MCQ: ASP.Net1. In order for query string values to be available during page processing, you must

submit the page using an HTTP GET command.A. TrueB. FalseANSWER: 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.  TrueB.  FalseANSWER: A

3. Can you call SQL Trigger from ASP.NET application explicitly?A. YesB. NoC. None of themANSWER: 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. IsPostBackANSWER : 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 modelANSWER: 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 BoxB. Drive List Box

Page 2: MCQ ASP.NET

C. Dir List BoxD. File List Box  ANSWER: D

8. What debugging tools come with the .NET SDK?A. CorDBG – command-line debuggerB. Dbg CLR – graphic debuggerC. Both A and B  D. None of the aboveANSWER: 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 adaptorC. GetTableDetails methodD. 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.IsNumberD. char.IsLetterOrDigitANSWER: A

11. what are the Activation modes for .NET Remoting?A. SingletonB. SinglecallC. Both D. NoneANSWER: 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.

Page 3: MCQ ASP.NET

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 blockB. catch blockC. finally blockD. throw statementANSWER: D

15. Which of the following events will fire when the Insert key is pressed?A. KeyDownB. KeyPressC. KeyUpD. KeyDown,KeyPressANSWER: 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. LostFocusB. ValidatingC. LeaveD. ValidatedANSWER: B

Page 4: MCQ ASP.NET

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. LostFocusB. ValidatingC. LeaveD. ValidatedANSWER: 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.TrueB. FalseANSWER: 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. TrueB. FalseANSWER: 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 cookieB. A query stringC. A URLD. A hidden form fieldANSWER : D

22. What is the last stage of the Web forms lifecycle?A. Event HandlingB. Page_LoadC. ValidateD. Page_UnloadANSWER : D

23. How does ASP.NET store SessionIDs by default?A. In cacheB. In cookiesC. In a global variableD. In URL strings or in a databaseANSWER : B

Page 5: MCQ ASP.NET

24. Do I need IIS to develop a Web application in ASP.NET 2.0?A. YesB. NoANSWER : B

25. What namespace does the Web page belong in the .NET Framework class hierarchy?A. System.Web.ControlB. System.Web.RootBuilderC. System.Web.UserControlD. System.Web.UI.PageANSWER : D

26. Where would you define application and session level events?A. Global.asaxB. Default.aspxC. Web.ConfigD. General.aspxANSWER : A

27. What attribute must be set on a validator control for the validation to work?A. ValidateB. ValidateControlC. ControlToBindD. ControlToValidateANSWER : D

28. Which of the following contains web application settings?A. app.configB. web.configC. assembly.configD. machine.configANSWER : B

29. What is default time of expire session?A. 20 minuteB. 40 minuteC. 100 minuteD. 1200 hoursANSWER : A

30. In Which Page Cycle All Controls Are Fully Loaded?A. Page_Load()B. Page_Init()C. Page_Render()D. Page_Unload()

Page 6: MCQ ASP.NET

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. <%@ Control %>B. <%@ Master %>C. <%@ MasterType %>D. <%@ Page %>ANSWER : B

32. What DataType is return in IsPostback property?A. bitB. BooleanC. intD. stringANSWER : 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 theseANSWER : 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 applicationA. Session ObjectsB. Application ObjectsC. ViewstateD. All of the aboveANSWER : D

Page 7: MCQ ASP.NET

37. Which data control does not exist in asp.netA. GridViewB. DataListC. RepeaterD. tableViewANSWER : D

38. Which control would you use if you needed to make sure the values in two different controls matched?A. Required Field ValidatorB. Custom Validator controlC. CompareValidator controlD. Regular expression validator ControlANSWER : 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 PropertyC. DataMemberD. None of theseANSWER : A

40. Difference between response.redirect and server.transfer.A. response.redirect will take you to another page with out round tripB. server.transfer will take the round trip from server to clientC. all the aboveD. none of theseANSWER : 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 applicationB. Assemblies that are used on web sites on only this web server machine.C. Assemblies that are used by web applications anywhere on the networkD. Assemblies that are XCOPY’d to the location.ANSWER : A

42. Which is not a validation control?A. Required Field ValidatorB. Compare ValidatorC. Error ValidatorD. Regular Expression ValidatorANSWER : C

Page 8: MCQ ASP.NET

43. When will a session be started in an application?A. Before Application StartedB. After Application StartedC. When the Client first sends a request to browserD. While closing the applicationANSWER : C

44. Which control is used to sort the data and allow paging?A. DatalistB. Repeater ControlC. DataGridD. None of theseANWER : C

45. What is the Web.config file used for?A. To store the global information and variable definitions for the applicationB. Configures the time that the server-side codebehind module is calledC. To configure the web serverD. To configure the web browserANSWER : 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 expressionsB. Regular expressionsC. Irregular expressionsD. Basic expressionsANSWER : B

48. Which namespace is used when we connect our asp.net page to sql serverA. System.data.sqlclientB. System.data.sqlC. System.sqlserverD. System.urlANSWER : A

49. Which of the following is not supported for IIS?A. Windows XP ProfessionalB. Windows XP HomeC. Windows 2003 Server

Page 9: MCQ ASP.NET

D. Windows 2000 ServerANSWER : B

50. The process in which a web page sends data back to the same page on the server is called?A. PostBackB. SessionC. Query stringsD. All the aboveANSWER : 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 FalseB. The AutoPostBack attribute is set to FalseC. The codebehind module is not properly compiledD. The ListBox must be defined WithEventsANSWER : 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 theseANSWER: 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. TrueB. FalseANSWER: A

Page 10: MCQ ASP.NET

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 SessionANSWER: A

58. Assemblies are the building blocks of the .NET frameworkA. TrueB. FalseANSWER: 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. TRUEB. FALSEANSWER: A

60. Can a .NET web application consume Java web service ?  A. trueB. falseANSWER: A

61. ColumnMapping belongs to System.Data namespaces ?A. trueB. falseANSWER: A

62. In order to get assembly info which namespace we should import?A. system.reflection    B. System.Collections.Generic             C. System.ConfigurationD. System.assemblyANSWER: A

63. What methods are fired during the page load?A. Unload()        B. PreRender()    C. Load()    D. All The AboveANSWER: B

Page 11: MCQ ASP.NET

64. Ispostback event is generated by the web controls to alert the server to take respected action of the event generated. A. true B. falseANSWER: A

65. The Dataset is an core of connected architecture. A. true B. falseANSWER: B

66. NET DLL contains Very Limited Number Of classes A.true B.falseANSWER: B

67. What is the full form of WSDLA. Web Services Description LanguageB. Web Services Designing LanguageC. Windows Services Designing LanguageD. None of theseANSWER: A

68. Setting a permanent cookie is not like Session cookie, It is Specially used for particular Scenario. A. True B. falseANSWER: 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 AboveANSWER: 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. FalseANSWER: B

71. Advantages of WCF over Web Services? (Windows communication Foundation)A. WCF can create services similar in concept to ASMXB. WCF is implemented on pipelineC. WCF is more secure, reliable

Page 12: MCQ ASP.NET

D. WCF does not have all Http capabilitiesE. All The AboveANSWER: 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 programC. Inside a functionD. None Of the AboveANSWER: B

73. What is the root namespace for all types?A. Root        B. System        C. Parent    D. WebANSWER: 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. falseANSWER: A

75. What is a Managed Data ?A. Memory allocation/de-allocation is done  by userB. Memory allocation/ de-allocetion is done by CLR itselfANSWER: 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. TrueB. falseANSWER: 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. FalseANSWER: A

78. Singleton architecture is to be used when all the applications have to use or share same data. A. True

Page 13: MCQ ASP.NET

B. FalseANSWER: A

79. Which statements are correct about asp.net AJAX ?A. ASP.NET AJAX is the name of Microsoft’s AJAX solutionB. 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 AboveANSWER: D   

80. Can We Pass parameter to Crystal Report (.rpt) File ?A. Yes B. NoC. NoneANSWER: A

81. Which property common in every validation control?A. ValueToCompare B. ValidationExpressionC. ControlToValidate   D. InitialValueANSWER: 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 TRUEA. 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 AboveANSWER: A

83. How many types of cookies are there? A. 1B. 2  C. 3D. 4ANSWER: B

84. What’s the .NET collection class that allows an element to be accessed using a unique key?A. ListB. HashTable  C. ArrayListD. Arry

Page 14: MCQ ASP.NET

ANSWER: B

85. What’s the top .NET class that everything is derived from? A. System.Object  B. SystemC. System.DataD. System.netANSWER: 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. NoC. Both Yes And NO D. None of the aboveANSWER: B

88. Can you prevent your class from being inherited by another class? A. YesB. NoANSWER: A 

89. Which of the following is TRUE about Windows Authentication in ASP.NET?A. Automatically determines role membershipB. Role membership determined only by user programming C. ASP.NET does not support Windows AuthenticationD. All of the AboveANSWER: A  

90. What are WebMethod attribute propertiesA. [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

Page 15: MCQ ASP.NET

A. Server.Transfer()B. Response.Redirect()   C. Response.Transfer() D. Request.Redirect()ANSWER: D

92. Team foundation is a ________ tier architectureA. OneB. TwoC. ThreeD. NoneANSWER: C

93. Is it possible to inline assembly or IL in C# code? A. YesB. NoANSWER: B

94. Is it possible to have a static indexer in C? A. YesB. NoANSWER: B

95. In an ASP.NET application, can we add more than one WEB.CONFIG files. Can it run?A. YesB. NoANSWER: A

96. Can we run asp.net application without WEB.CONFIG file?A. YesB. NoANSWER: A

97. Caching is considered as the best way to enhance the performance of the application.A. YesB. NoANSWER: A

98. The main event fired when we call bind method in a datagridA. First: GridView_DataBinding , Then, GridView_RowCreatedB. First:GridView_RowCreated,  Then,GridView_DataBindingC. GridView_DataBindingD. First: GridView_DataBinding , Then, GridView_RowCommandANSWER: A

Page 16: MCQ ASP.NET

99. Which are the components of a strong name? A. Name of the assemblyB. version numberC. Culture identityD. public key token. E. All of theseANSWER: E

100.To test a Web service you must create a windows application or Web application to consume this service? A. TrueB. FalseANSWER: B

101. Is it possible to Override Private Virtual methods. A. YesB.NoANSWER: B

102.The default size cache of a 128mb RAM is 128mb384mb3.256mb512mbANSWER: C

103.Does web service have a state?A. YesB. NoANSWER: A

104.What is the maximum size of query string?A. 384 bytesB. 128 bytesC. 255 bytesD. 512 bytesANSWER: C

105.Which Namespace is used for event log support?A. System.Reflection;B. System.DiagnosticsC. System.CollectionsD. System.Web.UIANSWER: B

106.Where do you store the information about the user’s locale?A. System.Web.UI

Page 17: MCQ ASP.NET

B. System.Web.UI.Page.Culture C. System.Web.UI.Page D. System.WebANSWER: B

107.How many classes can a single .NET DLL contain?  A. OneB. TwoC. ThreeD. ManyANSWER: D

108.What is the transport protocol you use to call a Web service?A. HTTPB. SMTPC. TCPD. SOAPE. POPANSWER: D

109.Web Controls Supports CSSA. TrueB. FalseANSWER: A

110.There can be more than 1 machine.config file in a systemA. TrueB. FalseANSWER: A

111.what is the difference between user control and custom controlA. Both can use as drag and drop toolB. Both are sameC. Both can use different applicationD. 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. .asmxB. .ascxC. .aspxANSWER: A

113.Which of the following is not a member of ADODBCommand object-?A. ExecuteReaderB. ExecuteScalar

Page 18: MCQ ASP.NET

C. ExecuteStreamD. OpenE. CommandTextANSWER: D

114.What does Response.End will do?A. It will stop the server processB. It will stop the client processC. None of the aboveANSWER: A

115.How do you add ASP.Net 3rd party component?A. By add/Remove items in the project menuB. Add reference of dll file and place the code where ever requiredC. Cannot add 3rd party component to asp.netANSWER: B

116.What is a diffgram ?A.The one which renders the dataset object contents to XMLB.Finds the difference in two objectsC.Finds the difference in two filesD.None of the aboveANSWER: B

117.Which of the following extension does a webservice file will have?A. .asmxB. .aspxC. .ascxD. .resxANSWER: A

118.Select the caching type supported by ASP.NetA. Output CachingB. DataCachingC. Both a & bD. None of the aboveANSWER: C

119.How do you trace the application_End event on runtime?A.    By DebuggingB.    By TracingC.    Can not be doneANSWER: C

120.Which of the following is true ?A. User controls are displayed correctly in the Visual Studio .NET DesignerB. Custom controls are displayed correctly in VS.Net DesignerC. User and Custom controls are displayed correctly in the Visual Studio .NET Designer.

Page 19: MCQ ASP.NET

ANSWER: B

121.Where is the default Session data is stored in ASP.Net?A. InProcessB. StateServerC. SQL ServerD. All of the aboveANSWER: A

122.Which of the following languages can be used to write server side scripting in ASP.NET?A. C#B. CC. Visual BasicANSWER: A

123.What is the default authentication mode for IIS?A. WindowsB. AnonymousC. Basic AuthenticationD. NoneANSWER: B

124.Can a dll run as stand alone application ?A. NoB. YesC. Sometimes we can make it by introducing some codeANSWER: A

125.The code will be processed on web server when the runat attribute of the < Script > tag has the following value?A. DesktopB. ClientC. Server ANSWER: C

126.What is the difference between HTTP handlers & HTTP modules?A. Httphandler is an class and Httpmodule is an assemblyB. Httphandler is an event handler and httpmodule is module to do some taskC. Both of the aboveD. None of the aboveANSWER: A

127.How do you register a user control?A. Add Tag prefix, Tag nameB. Add Source, Tag prefixC. Add Src, Tagprefix, Tagname

Page 20: MCQ ASP.NET

ANSWER: C

128. Is it Possible to Serialize HashTable with XMLSerializer?A. YesB. NoANSWER: 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 PCB. Not necessary to connect with serverC. user data can update and retrieve in dataset and when connection connected, update values with serverD. All of the aboveANSWER: C

130.The object used by SQL connection to make Security DemandsA. SQLLCientAttributeB. SQLPermissionC. SQLPermissionClientD. SQLClientPermission ANSWER: D

131.How do you turn off the Session state for a webform ?A. In Web.config file set the tag to TrueB. In Web.config file set the tag to falseC. Set the Session state to false in webform properties windowD. Set the EnableSession state to false in webform properties windowANSWER: D

132.The number of forms that can be added to a aspx page isA. 2B. 3C. 1D. More than oneANSWER: 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 headersB. Transfers all the form data to test.aspx with out HTTP headersC. Calls post method on test.aspxD. None of the aboveANSWER: 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

Page 21: MCQ ASP.NET

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 destinationD. 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. AnonymousB. CertificateC. FormsD. Microsoft Windows Integrated SecurityANSWER: 4

136.On which of the operating system below ASP.NET can run?A. Windows XP ProfessionalB. Windows 2000 C. Both A) and B) D. None of the AboveANSWER: C

137.Which of the following is true about session in ASP.NET?A. ASP.NET automatically delete sessions after configurable timeout intervalB. Programmers has to take care of delete sessions after configurable timeout interval C. The default time interval is 5 minutesD. None of the AboveANSWER: A

138. In ASP.NET if one uses Windows authentication the current request attaches an object called asA. SerializationB. WindowsPrincipalC. WindowDatsetD. None of the AboveANSWER: B

139. In ASP.NET if one wants to maintain session then which of the following is used?A. In-process storageB. Session State Service C. Microsoft SQL Server D. All the Above

Page 22: MCQ ASP.NET

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 onA. PipelineB. WaterfallC. Top-downD. Bottom-upANSWER: A

142. In ASP.NET if one wants to set the focus on a particular controlA. Call SETFOCUSB. Call SETCONTROLC. Call FOCUS methodD. None of the aboveANSWER: C

143. In ASP.NET page framework an automatic way to associate page events and methods isA. 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 methodsD. None of the AboveANSWER: A

144.Which of the following can be used to debug .NET application?A. Visual Studio .NET B. Runtime DebuggerC. Systems.Diagnostics classes D. All the AboveANSWER: 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 filesB. The access is restricted only to static files and non-ASP.NET resources.C. Both A and B D. None of the AboveANSWER: A

Page 23: MCQ ASP.NET

146.The control used in ASP.NET to display information from data set but with better formatting and editing behavior isA. Panel B. Button C. DataList D. None of the AboveANSWER: 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 aboveANSWER: C

148. If a developer of ASP.NET defines style information in a common location. Then that location is called asA. Master Page B. Theme C. CustomizationD. None of the AboveANSWER: 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 toolB. the Code Access Security Policy toolC. the ASP.NET IIS Registration toolD. the Web Site Administration ToolANSWER: 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.

Page 24: MCQ ASP.NET

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 asA. 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 AboveANSWER: 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 aboveANSWER: 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 isA. WebPartManagerB. ProxyWebPartManagerC. System.Activator D. None of the AboveANSWER: 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-cacheA. The session expires B. Clears the buffer area C. Avoid page to be cached D. None of the AboveANSWER: 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

Page 25: MCQ ASP.NET

C. By RCAD. None of the AboveANSWER: A

158. In ASP.NET application the Global.asax file lie in which directoryA. ROOTB. SystemC. ApplicationD. None of the AboveANSWER: 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 calledA. ThemeB. Cross Page PostingC. Code-front D. None of the aboveANSWER: B

160.Which of the following denote value that can be taken by Cache-Control of ASP.NET?A. PublicB. PrivateC. 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.

Page 26: MCQ ASP.NET

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. IWebEventCustomEvaluatorB. WebEventProviderC. WebBaseEventD. WebAuditEventANSWER: C

165.The GridView control in ASP.NET has which of the following featuresA. Automatic data binding B. Automatic paging C. Both A) and B) D. None of the aboveANSWER: C

166. If in an ASP.NET application one want to create http handlers which of the interface is usedA. IHttpHandlerFactory B. HandlerC. PipelineD. None of the aboveANSWER: 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 firedA. PreRender( ) B. Load() C. Unload( ) D. None of the AboveANSWER: B

168.Which of the following denote the web control associated with Table control function of ASP.NET?

Page 27: MCQ ASP.NET

A. DataListB. ListBoxC. TableRowD. All the AboveANSWER: 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 AboveANSWER: 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 visitA. Cookie Authentication B. Passport Authentication C. Windows Authentication D. None of the AboveANSWER: A

171.Which of the following denote New Data-bound Controls used with ASP.NETA. GridView B. FormViewC. SqlDataSource D. Both A) and B) E. All the AboveANSWER: 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. XCOPYB. the Copy Web toolC. the Publish Web toolD. a Web Setup projectANSWER: 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.

Page 28: MCQ ASP.NET

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 elementsA. < allow > B. < deny > C. Both A and B D. None of the AboveANSWER: C

175.The .NET Framework provides a runtime environment calledA. RMTB. CLRC. RCTD. RCANSWER: B

176.Give One word: Common type system is built into which of the followingA. CLRB. RCTC. RCWD. GACANSWER: A

177.Find the term: The .NET framework which provides automatic memory management using a technique called.A. SerializationB. Garbage Collection C. Assemblies D. OverridingANSWER: 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. HighestD. All the AboveANSWER: D

179.The technique that allow code to make function calls to .NET applications on other processes and on other machines isA. .NET Threading B. .NET Remoting

Page 29: MCQ ASP.NET

C. .NET RMTD. .None of the aboveANSWER: B

180.Which of the following denote the property in every validation control?A. ControlToValidate propertyB. Text property C. Both A and B D. None of the AboveANSWER: 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 AboveANSWER: B

182.Which of the following is FALSE?A. ASP.NET applications run without a Web ServerB. ASP+ and ASP.NET refer to the same thing C. ASP.NET is a major upgrade over ASPD. None of the AboveANSWER: 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 tagANSWER: 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 AboveANSWER: 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 propertyB. Call the DataBind methodC. Both A and B D. None of the AboveANSWER: C

Page 30: MCQ ASP.NET

186.The namespace within the Microsoft .NET framework which provides the functionality to implement transaction processing isA. System.EnterpriseServicesB. System.Security C. System.Diagnostics D. System.DataANSWER: 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 asA. ReflectionB. EnumerationC. BindingD. SerializationANSWER: A

189.Which of the following transfer execution directly to another page?A. Server.TransferB. Response.RedirectC. Both A and BD. None of the AboveANSWER: 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. DataListB. GridViewC. CompareValidatorD. ListviewANSWER: 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 belowA. One must override the method ReceiveMessage B. One must override the method InitializeMethod C. Both A and BD. One must override the method ProcessMessage

Page 31: MCQ ASP.NET

ANSWER: A

192.Suppose a .NET programmer wants to convert an object into a stream of bytes then the process is calledA. SerializationB. Threading C. RCW D. AppDomainANSWER: A

193.Which of the following method is used to obtain details about information types of assembly?A. GetTypesB. GetType C. Both A and BD. None of the AboveANSWER: 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 aboveANSWER: 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.SmtpMailC. Both A and B D. None of the AboveANSWER: C

196.The actual work process of ASP.NET is taken care byA. inetinfo.exe B. aspnet_isapi.dll C. aspnet_wp.exe D. None of the AboveANSWER: C

197.Which of the following can be used to add alternating color scheme in a Repeater control?A. AlternatingItemTemplateB. DataSource C. ColorValidator D. None of the Above

Page 32: MCQ ASP.NET

ANSWER: A

198.The type of code found in Code-Behind class isA. Server-side code B. Client-side code C. Both A and BD. None of the aboveANSWER: 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 AboveANSWER: D

200. In ASP.NET the sessions can be dumped by usingA. Session.DumpB. Session.AbandonC. Session.ExitD. None of the AboveANSWER: 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?

Page 33: MCQ ASP.NET

A. Yes B. No ANSWER: A

205.When you create a relationship between tables in ADO.NET DataSetA. 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. NONEANSWER: 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. NONEANSWER: 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

Page 34: MCQ ASP.NET

ANSWER: D

211.To perform asynchronous data access, what must be added to the connection string?A. BeginExecute=trueB. MultiThreaded=trueC. MultipleActiveResultSets=trueD. Asynchronous=trueANSWER: 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 aboveANSWER: B

214.To improve the performance and scalability of your .NET application. Which one of the following techniques would help?A. Connection StringsB. Connection PoolingC. SQL InjectionD. Data AdapterANSWER: B

215.Which method is used to commit all changes in the DataSet or DataTable?A. Update()B. AcceptChanges()C. GetChanges()D. NoneANSWER: B

216.By default, the pooling property with connection string is set as True/FalseA. TrueB. FalseANSWER: A

Page 35: MCQ ASP.NET

217.Between Windows authentication and SQL Server Authentication, SQL Server authentication is the trusted one.A. TrueB. FalseANSWER: B

218.Which of the following is a DataView method?A. AddB. RemoveC. FindD. All the aboveANSWER: 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 patternC. Observer patternD. NoneANSWER: 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 inA. SessionB. CacheC. Server registryD. AllANSWER: 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 canA. Store user info in Cache and static info in SessionB. Store user info in Session and static info in CacheC. Store both in SessionD. Store both in CacheANSWER: B

222.Base class for LINQ to SQL is  A. DataContextB. DataSetC. Data.SqlClient

Page 36: MCQ ASP.NET

D. NoneANSWER: A

223.Which web server control cannot be both either databound or unbound?A. DropdownlistB. ListBoxC. GridViewD. ALLANSWER: C

224.Which of the following doesnot come with .NET 3.0A. WCFB. WPFC. WFD. TFSANSWER: D

225.MVC stands forA. model view controlB. modern view controlC. model vast controlD. model view couplingANSWER: A

226.Which of the following is associated with freeing of memory?A. System.DataD. System.DirectoryServicesC. System.gc.collectD. System.Drawing.ColorANSWER: C

227.Web methods are part ofA. Web servicesB. Web siteC. Web applicationD. WPF application.ANSWER: A

228.WAS stands forA. Windows Action ServerB. Windows Activation ServerC. Web application servicesD. Web activation serverANSWER: B

229.WCF service can be hosted inA. Console application

Page 37: MCQ ASP.NET

B. WASC. BothD. NoneANSWER: 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 forA. Factory patternB. Abstract factory patternC. Singleton patternD. Observer patternANSWER: B

231.How many application blocks ate there in enterprise library?A. 5B. 3C. 12D. 8ANSWER: D

232.Which application block type  is not present in enterprise library?A. CachingB. ExceptionC. PerformanceD. LoggingANSWER: C

233.Which of the following cannot be used for navigating to a new web page?A. Response.writeB. Response.RedirectC. Server.TransferD. Server.ExecuteANSWER: A

234. .NET application cannot be developed usingA. C#B. VBC. VJ#D. Python

Page 38: MCQ ASP.NET

ANSWER: D

235.A WCF service can be accessed throughA. HTTPC. TCP\IPC. MSMQD. All the above channelsANSWER: D