MCQOPTIONS
Saved Bookmarks
This section includes 228 Mcqs, each offering curated multiple-choice questions to sharpen your Computer Science Mcqs knowledge and support exam preparation. Choose a topic below to get started.
| 51. |
What are the element of code access security? |
| A. | Evidence,Permission |
| B. | SQLSecurity |
| C. | UserInterface |
| D. | SQL Injection |
| Answer» B. SQLSecurity | |
| 52. |
Which interface you will use wrap an AJAX client control into a custom server control? |
| A. | IScriptManager |
| B. | IScriptControl |
| C. | IScriptAJAX |
| D. | None of the above |
| Answer» B. IScriptControl | |
| 53. |
What is the recommended method for securing sensitive connection string information? |
| A. | Encrypting the data in the application configuration file |
| B. | Using a code obfuscator |
| C. | Using Integrated Security (Windows Authentication) |
| D. | Querying the user for his or her credentials at run time |
| Answer» D. Querying the user for his or her credentials at run time | |
| 54. |
If you must use a user name and password to connect to a database, where should you store the sensitive information? |
| A. | Compiled in the application |
| B. | In an encrypted application configuration file |
| C. | In a resource file deployed with the application |
| D. | In the registry |
| Answer» C. In a resource file deployed with the application | |
| 55. |
Which of the following works on client side? |
| A. | ViewState |
| B. | HiddenField |
| C. | ControlState |
| D. | All of the above |
| Answer» E. | |
| 56. |
What is jQuery? 1. jQuery is an open source library 2. It works client side. 3. jQuery is java technology. |
| A. | 1, 2 |
| B. | 1, 2, 3 |
| C. | 1, 3 |
| D. | None of the above |
| Answer» B. 1, 2, 3 | |
| 57. |
Which SqlCommand execution returns the number of effected records in the table? |
| A. | ExecuteNonQuery |
| B. | ExecuteReader |
| C. | ExecuteXmlReader |
| D. | ExecuteScalar |
| Answer» B. ExecuteReader | |
| 58. |
What should you do to access the returned tabular data after starting execution of a command that runs asynchronously? (Choose all that apply.) 1. Call the EndExecuteNonQuerymethod. 2. Call the EndExecuteReadermethod. 3. Wait for the StatementCompletedevent to fire and iterate through the DataReader. 4. Wait for the StatementCompletedevent to fire, call the EndExecuteReadermethod, and then iterate through the DataReader. |
| A. | 1, 2 |
| B. | 1, 2, 3 |
| C. | 2, 3 |
| D. | 2, 4 |
| Answer» E. | |
| 59. |
Which data provider gives the maximum performance from a connection to SQL Server? |
| A. | The OLE DB data provider. |
| B. | The JDBC data provider. |
| C. | The SqlClient data provider. |
| D. | The Oracle data provider |
| Answer» D. The Oracle data provider | |
| 60. |
Which CommandType value is incorrect? |
| A. | StoredProcedure |
| B. | TableDirect |
| C. | TableSchema |
| D. | Text |
| Answer» D. Text | |
| 61. |
What is Caspol? |
| A. | Command line tool |
| B. | Code access security policy tool |
| C. | Case Tool |
| D. | Command line tool & Code access security policy tool |
| Answer» E. | |
| 62. |
Which of the following works on server side? |
| A. | ViewState |
| B. | HiddenField |
| C. | Application and session |
| D. | All of the above |
| Answer» D. All of the above | |
| 63. |
In order to prevent a browser from caching a page which of these xstatements should be written? |
| A. | Response.Cache.SetNoStore(); |
| B. | Response.Cache.SetNoServerCaching(); |
| C. | Response.Cache.SetNoCaching(); |
| D. | None of these |
| Answer» B. Response.Cache.SetNoServerCaching(); | |
| 64. |
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» E. | |
| 65. |
Which of the following is not a member of ADODBCommand object? |
| A. | ExecuteScalar |
| B. | ExecuteStream |
| C. | Open |
| D. | ExecuteReader |
| Answer» D. ExecuteReader | |
| 66. |
A Master Page contains a ScriptManager control and a user wants the AJAX functionality on content page then which control is necessary on content page. |
| A. | AsyncPostBackTrigger |
| B. | ScriptManager |
| C. | ScriptManagerProxy |
| D. | None of the above. |
| Answer» D. None of the above. | |
| 67. |
From the following which is not a valid state management object? |
| A. | Querystate |
| B. | Cookies |
| C. | Application state |
| D. | Hidden form fields |
| Answer» B. Cookies | |
| 68. |
Validation events of server controls occur before the page is post back to the server. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 69. |
By default, a .Net web site is configured with which of the following authentication types? |
| A. | Anonymous |
| B. | Basic |
| C. | Digest |
| D. | Integrated Windows authentication |
| E. | a and d |
| Answer» F. | |
| 70. |
Where do we include the user lists for Form authentication? |
| A. | < credential> |
| B. | < authorization> |
| C. | < Identity> |
| D. | < authentication> |
| Answer» B. < authorization> | |
| 71. |
When do LINQ queries actually run? |
| A. | When they are iterated over in a foreachloop |
| B. | When calling the ToArray() method on the range variable |
| C. | When calling the ToList() method on the range variable |
| D. | All of the above |
| Answer» E. | |
| 72. |
According to the given below statements, choose the correct option. Statement 1: Application caching is the process of storing data (and not pages) in a cache object. Statement 2: Page output caching stores a rendered page, portion of a page, or version of a page in memory. Statement 3: Caching reduces the time required to render cached page in future requests. |
| A. | Only statement 1 is correct. |
| B. | Statement 2 and 3 are correct. |
| C. | Only statement 3 is correct. |
| D. | All statements are correct. |
| Answer» E. | |
| 73. |
What is/are the advantages of StateServer session mode? |
| A. | Its keeps the data separate from IIS so; if any Issue comes with IIS it will not hamper Session data. |
| B. | It is useful in web farm and web garden scenarios. |
| C. | Process is fast due to serialization and de-serialization. |
| D. | A and B are the correct option. |
| Answer» E. | |
| 74. |
What LINQ expressions are used to shape results in a query? 1. where 2. select 3. join 4. group |
| A. | 2, 4 |
| B. | 1, 2 |
| C. | 3, 4 |
| D. | None |
| Answer» B. 1, 2 | |
| 75. |
What is the fully qualified name of the base class of all server controls? |
| A. | System.Web.UI.Control |
| B. | System.Web.UI |
| C. | System.Control |
| D. | All of the above |
| Answer» B. System.Web.UI | |
| 76. |
_____________is a property common in every validation control. |
| A. | ValidationExpression |
| B. | InitialValue |
| C. | ValueToCompare |
| D. | ControlToCompare |
| E. | ControlToValidate |
| Answer» F. | |
| 77. |
Which type of processing model does asp.net stimulate? |
| A. | Static |
| B. | Linear |
| C. | Bottom up |
| D. | Event-driven |
| Answer» E. | |
| 78. |
What are the types of cookies? |
| A. | Session cookies |
| B. | Persistent cookies |
| C. | Dummy cookies |
| D. | Option A and B are correct |
| Answer» E. | |
| 79. |
Which of the following is the way to monitor the web application? |
| A. | MMC Event viewers |
| B. | Performance logs |
| C. | Alerts Snap-ins |
| D. | ALL |
| Answer» E. | |
| 80. |
__________________ file apply settings to all ASP.NET applications |
| A. | web.config |
| B. | machine.config |
| C. | global.asax file |
| D. | application object |
| Answer» C. global.asax file | |
| 81. |
Which protocol is used for requesting a web page in ASP.NET from the Web Server? |
| A. | HTTP |
| B. | TCP |
| C. | SMTP |
| D. | None of the above. |
| Answer» B. TCP | |
| 82. |
If you want to cache the page according to the browser, then what will you do? |
| A. | Write the given below code in aspx page. |
| B. | Write the given below code in aspx page. |
| C. | Write the given below code in aspx page. |
| D. | None of the above. |
| Answer» B. Write the given below code in aspx page. | |
| 83. |
A button control is located outside the UpdatePanel control. You need that a given button control outside of the UpdatePanel should cause the UpdatePanel to execute an update with partial update. What will you do to achieve this task? |
| A. | - Add a PostBackTrigger control to the Triggers section of the UpdatePanel. - Set the ControlID attribute of the AsyncPostBackTrigger control to the I |
| B. | - Add a Trigger control to the Triggers section of the UpdatePanel. - Set the ControlID attribute of the AsyncPostBackTrigger control to the ID of the |
| C. | - Add an AsyncPostBackTrigger control to the Triggers section of the UpdatePanel. - Set the ControlID attribute of the AsyncPostBackTrigger control to |
| D. | None of the above. |
| Answer» D. None of the above. | |
| 84. |
What are the advantages of AJAX? |
| A. | AJAX is a platform-independent technology |
| B. | It provides partial-page updates |
| C. | Improved performance |
| D. | All of the above |
| Answer» E. | |
| 85. |
You need to allow users to choose their own themes. In which page event will you write the user-selected theme? |
| A. | Page_Load |
| B. | Page_Render |
| C. | Page_PreInit |
| D. | Page_PreRender |
| Answer» D. Page_PreRender | |
| 86. |
Client-side validation is turned on by default. If you want that particular validation control should not validate at client side, what will you do? |
| A. | Set the EnableClientScript property to false |
| B. | Set the validate property to false |
| C. | Set the EnableClientScript property to true |
| D. | Set the Page.Isvalid property to false |
| Answer» B. Set the validate property to false | |
| 87. |
What are the types of Web Server Button Controls that can be created? |
| A. | Only Submit buttons |
| B. | Only Command buttons |
| C. | Submit and command buttons |
| D. | None of the above. |
| Answer» D. None of the above. | |
| 88. |
How will you specifying the Cache Location? |
| A. | You can use browser settings to specify where a page is cached. |
| B. | You can use the Location attribute of the directive to specify where a page is cached. |
| C. | You can use the Location attribute in QueryString to specify where a page is cached. |
| D. | None of the above. |
| Answer» C. You can use the Location attribute in QueryString to specify where a page is cached. | |
| 89. |
What is/are the advantages of master page? |
| A. | It helps to display common content in multiple pages. |
| B. | They allow you to centralize the common functionality of your pages so that you can make updates in just one place. |
| C. | It helps to create a common page layout. |
| D. | All of the above. |
| Answer» E. | |
| 90. |
How many types of authentication ASP.NET supports? |
| A. | Windows Authentication. |
| B. | .NET Passport Authentication. |
| C. | Forms Authentication. |
| D. | All of the above. |
| Answer» E. | |
| 91. |
Which attribute is necessary for HTML control to work as a HTML server control? |
| A. | runat=”server” |
| B. | runat=”web-server” |
| C. | ID=”server” |
| D. | ID=”web-server” |
| Answer» B. runat=”web-server” | |
| 92. |
Which control can be used to update only the portion of the page? |
| A. | UpdatePanel |
| B. | ScriptManager |
| C. | AsyncPostBackTrigger |
| D. | None of the above. |
| Answer» B. ScriptManager | |
| 93. |
If any user has disabled cookies in their browsers, what can you do to enable them to use forms authentication? |
| A. | Set BoweserCookieEnabled=true; |
| B. | Set cookieless=true; |
| C. | Use the AutoDetect setting of the cookieless attribute. |
| D. | None of the above. |
| Answer» D. None of the above. | |
| 94. |
Which is the mandatory property for all validation controls? |
| A. | ControlToValidate |
| B. | Message |
| C. | EnableClientScript |
| D. | EnableServerScript |
| Answer» B. Message | |
| 95. |
MARS feature is disabled by default. What action you will perform in connection string to enable this feature? |
| A. | Set MultipleActiveResultSets=True" |
| B. | Set MultipleResultSets=true" |
| C. | Set ResultSets=True" |
| D. | None of the above. |
| Answer» B. Set MultipleResultSets=true" | |
| 96. |
How will you add a TextBox control at runtime on the form? Choose the correct one. |
| A. | TextBox obj = new TextBox(); obj.ID = "txtUserName"; form1.Controls.Add(obj); |
| B. | form1.Controls.Add(TextBox); |
| C. | this.FindControl.add(TextBox); |
| D. | None of the above. |
| Answer» B. form1.Controls.Add(TextBox); | |
| 97. |
Which object works on client side in state management system? |
| A. | ViewState |
| B. | cookies |
| C. | Query strings |
| D. | All of the above |
| Answer» E. | |
| 98. |
You are creating an ASP.NET application for company CareerRide. You use form based authentication to validate users. You need to prevent unauthenticated users from accessing the application. What should you do? |
| A. | In the authorization section of the Web.config file, set the users attribute of the deny element to “?” |
| B. | Set In the authorization section of the Web.config file, set the users attribute of the deny element to “*” |
| C. | In the authorization section of the Machine.config file, set the users attribute to the allow element to “?”. |
| D. | None of the above. |
| Answer» B. Set In the authorization section of the Web.config file, set the users attribute of the deny element to “*” | |
| 99. |
What is the use of VaryByParam attribute in OutputCache directive? |
| A. | You can neglect VaryByParam attribute while using Page output caching. |
| B. | The VaryByParam attribute determines which versions of the page output are actually cached. |
| C. | The VaryByParam attribute determines which web page is cached in database. |
| D. | None of the above. |
| Answer» C. The VaryByParam attribute determines which web page is cached in database. | |
| 100. |
There is a button on page name cancel and it should bypass validation when cancel button is clicked. What will you do? |
| A. | set CausesValidation = false |
| B. | set RemoveValidation=true |
| C. | set cancel=true |
| D. | None of the above |
| Answer» B. set RemoveValidation=true | |