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.
| 1. |
An indexer is |
| A. | A class |
| B. | A structure |
| C. | An enumeration |
| D. | A special type of property |
| Answer» E. | |
| 2. |
What are the three primary kinds of parameters are used while working with the Stored Procedure in ASP.NET? |
| A. | Input, Integer, String |
| B. | int, varchar, nvarchar |
| C. | Input, Output, InputOutput |
| D. | All of the above. |
| Answer» D. All of the above. | |
| 3. |
Some control, by default, does not cause an automatic PostBack, i.e TextChanged event of TextBox. Which property will you set for automatic postback of these types of controls? |
| A. | isPostBack=”false” |
| B. | isPostBack=”true” |
| C. | PostBack=”true” |
| D. | AutoPostBack=”true” |
| Answer» E. | |
| 4. |
Which of the following statement / s is / are true? |
| A. | CommitChanges is a method of SqlDataContext. |
| B. | CommitChanges is a method of DataContext. |
| C. | CommitChanges is a method of DbDataContext. |
| D. | CommitChanges is a method of OleDbData Context |
| Answer» C. CommitChanges is a method of DbDataContext. | |
| 5. |
What are the three primary kinds of parameters? |
| A. | Input, Integer, String |
| B. | Integer, String, DateTime |
| C. | int, varchar, nvarchar |
| D. | Input, Output, InputOutput |
| Answer» E. | |
| 6. |
Which of the following is the default authentication mode for IIS? |
| A. | Anonymous |
| B. | Windows |
| C. | Basic Authentication |
| D. | None |
| Answer» B. Windows | |
| 7. |
A web page has lots of input data, and you want the data input to be spread across multiple screens. What is the best control to use to implement this solution on a single Web page? |
| A. | ImageMap |
| B. | Panel |
| C. | Wizard |
| D. | None of the above |
| Answer» D. None of the above | |
| 8. |
When does Garbage collector run? |
| A. | When application is running low of memory |
| B. | It runs random |
| C. | When application is running for more than 15 minutes |
| D. | None of the above |
| Answer» B. It runs random | |
| 9. |
______________ is the DataType return in IsPostback property. |
| A. | bit |
| B. | boolean |
| C. | int |
| D. | object |
| E. | string |
| Answer» C. int | |
| 10. |
Which is the first event of ASP.NET page, when user requests a web page? |
| A. | PreLoad |
| B. | Load |
| C. | Preinit |
| D. | Init |
| Answer» D. Init | |
| 11. |
What is a web application running on multiple servers called? |
| A. | HTTP |
| B. | Web Servers |
| C. | Web Page |
| D. | Web farm |
| Answer» E. | |
| 12. |
To kill a users session explicitly which of the following will you use? |
| A. | Session.Close() |
| B. | Session.End() |
| C. | Session.Abondon() |
| D. | Session.Discard() |
| Answer» D. Session.Discard() | |
| 13. |
Windows-Based Authentication is well suited for. |
| A. | Intranet environment. |
| B. | Public web site. |
| C. | Desktop application. |
| D. | None of the above. |
| Answer» B. Public web site. | |
| 14. |
What ASP.NET object encapsulates the state of the client and the browser? |
| A. | Application Object |
| B. | Session Object |
| C. | Response Object |
| D. | Request Object |
| Answer» C. Response Object | |
| 15. |
In ASP.NET what are the different types of session mode available? |
| A. | InProc |
| B. | StateServer |
| C. | SQLServer |
| D. | All of the above |
| Answer» E. | |
| 16. |
What data type is returned when calling the ExecuteScalar method of a command object? |
| A. | System.Int32 |
| B. | Object |
| C. | No of effected records. |
| D. | None of the above. |
| Answer» C. No of effected records. | |
| 17. |
What property and method of the Page object do you use to register client script dynamically from code? |
| A. | ScriptManager control is used to dynamically register client script from code. |
| B. | The Page.ClientScript.RegisterClientScriptBlock is used to dynamically register client script from code. |
| C. | ScriptManagerProxy control is used to dynamically register client script from code. |
| D. | None of the above. |
| Answer» D. None of the above. | |
| 18. |
______________is the first method that is fired during the page load. |
| A. | PreRender() |
| B. | Load() |
| C. | Unload() |
| D. | Init() |
| Answer» E. | |
| 19. |
ASP.NET validation controls works (handle validation) at |
| A. | Client side only. |
| B. | Server side only. |
| C. | Both client side and server side. |
| D. | None of the above. |
| Answer» D. None of the above. | |
| 20. |
Which one of the following has a parameter called as “preserveForm”? |
| A. | Server.transfer |
| B. | Response.redirect |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. Response.redirect | |
| 21. |
Which validation control in ASP.NET can be used to determine if data that is entered into a TextBox control is of type Currency? |
| A. | ValidationSummary |
| B. | CompareValidator |
| C. | RequiredFieldValidator |
| D. | None of the above. |
| Answer» C. RequiredFieldValidator | |
| 22. |
Default Session data is stored in ASP.Net. |
| A. | StateServer |
| B. | Session Object |
| C. | InProcess |
| D. | all of the above |
| Answer» D. all of the above | |
| 23. |
Which session modes stores session Information in Current Application Domain? |
| A. | InProc |
| B. | StateServer |
| C. | SQLServer |
| D. | Off |
| Answer» B. StateServer | |
| 24. |
In which file you should write the connection string, so you can access it in all the web page for same application? |
| A. | In App_Data folder. |
| B. | In Web.config file. |
| C. | In MasterPage file. |
| D. | None of the above. |
| Answer» C. In MasterPage file. | |
| 25. |
Which of these data source controls do not implement Caching? |
| A. | LinqDataSource |
| B. | ObjectDataSource |
| C. | SqlDataSource |
| D. | XmlDataSource |
| Answer» B. ObjectDataSource | |
| 26. |
How to implement authentication via web.config? |
| A. | Include the authentication element. |
| B. | Include the authorization element. |
| C. | Include the identity element. |
| D. | Include the deny element. |
| Answer» C. Include the identity element. | |
| 27. |
What happens in the Init event of a page? |
| A. | ViewState is loaded on the page. |
| B. | Each child control of the page is initialized to its design time values. |
| C. | HTML is rendered. |
| D. | None of the above. |
| Answer» C. HTML is rendered. | |
| 28. |
If we want to add graphics using asp.net which of the following web control will you use? |
| A. | Link Button |
| B. | AdRotator |
| C. | Grid View |
| D. | Layout |
| Answer» C. Grid View | |
| 29. |
Application_Start event is available in which file? |
| A. | Global.asax |
| B. | Local.asax |
| C. | Web.config |
| D. | None of the above |
| Answer» B. Local.asax | |
| 30. |
Which of the following are required to enable users to change the title of web part? |
| A. | CatalogZone |
| B. | TitleZone |
| C. | EditorZone, AppearanceEditorPart |
| D. | WebPart |
| Answer» D. WebPart | |
| 31. |
What is the connection string’s key / value pair for using WindowsAuthentication in SQLServer 2000 and SQL Server 2005? |
| A. | 1, 2 |
| B. | 1, 2, 3 |
| C. | 2, 3 |
| D. | 1, 4 |
| Answer» D. 1, 4 | |
| 32. |
Which of the following is true when referencing master page from content page? |
| A. | Content pages can reference private indexer in the master page. |
| B. | Content pages can reference private Properties in the master page. |
| C. | Contentpages can reference public Properties in the master page. |
| D. | Content pages can reference private Methods in the master page. |
| Answer» D. Content pages can reference private Methods in the master page. | |
| 33. |
Which of the following template supports by Repeater control? |
| A. | All of the above |
| Answer» E. | |
| 34. |
You have to log the data into database if your session times out. Which event you will use? |
| A. | Session_End |
| B. | Application_End |
| C. | Application_Start |
| D. | Application_SessionTimeout |
| Answer» B. Application_End | |
| 35. |
If you are using Webparts in your web page then which control is necessary? |
| A. | WebpartController |
| B. | WebPartmanager |
| C. | WebpartZone |
| D. | None of the above |
| Answer» C. WebpartZone | |
| 36. |
OleDbConnectionobject works with? 1. When connecting to an Oracle database 2. When connecting to an Office Access database 3. When connecting to SQL Server 6.x or later 4. When connecting to SQL Server 2000 |
| A. | 1, 2 |
| B. | 2, 3 |
| C. | 1, 3 |
| D. | 4 |
| Answer» C. 1, 3 | |
| 37. |
What component do you need to enable for a user to add new web parts? |
| A. | WebpartZone |
| B. | CatalogZone |
| C. | WebPartManager |
| D. | WebManager |
| Answer» C. WebPartManager | |
| 38. |
What is the file extension of web service in ASP.NET? |
| A. | .ascx |
| B. | .asmx |
| C. | .aspx |
| D. | .docx |
| Answer» C. .aspx | |
| 39. |
What is the minimal information needed by a connection string to open a connection to a SQL Server 2000 or SQL Server 2005 database? 1. A valid data source 2. A valid provider name 3. A valid file path 4. Appropriate credentials or Integrated Security settings |
| A. | 1, 2 |
| B. | 1, 2, 3 |
| C. | 1, 3 |
| D. | 1, 4 |
| Answer» E. | |
| 40. |
What happens when you call the Close method of a connection object? 1. The connection is destroyed. 2. The connection is returned to the connection pool. 3. The StateChangeevent is fired. 4. All non - committed pending transactions are rolled back. |
| A. | 1, 2 |
| B. | 1,3 |
| C. | 2, 3, 4 |
| D. | All of the above |
| Answer» D. All of the above | |
| 41. |
How do you determine the actual SQL data type of a SqlParameter (the type expected by the SQL Server)? |
| A. | It is the .NET Framework data type in your application that the parameter represents. |
| B. | It is the type of column or data in SQL Server that the command expects. |
| C. | It is the type of column in a DataTablethat it represents. |
| D. | It is any type defined in the SqlDbDataTypeenumeration. |
| Answer» C. It is the type of column in a DataTablethat it represents. | |
| 42. |
What are the recommended techniques for enabling connection pooling on for a SQL Server 2000 or SQL Server 2005 database? 1. Setting the OLE DB Services connection string keyword to -4 2. Opening a connection and not explicitly disabling pooling 3. Setting the connection string keyword Pooling = True in the connection string 4. Using the Connection Pooling tab of the ODBC Data Source Administrator dialog Box |
| A. | 1, 2 |
| B. | 1, 2, 3 |
| C. | 2, 3 |
| D. | 1, 4 |
| Answer» D. 1, 4 | |
| 43. |
How do I explicitly turn on connection pooling for an OLE DB data source? |
| A. | By setting the OLE DB Services connection string keyword to 0 |
| B. | By setting the OLE DB Services connection string keyword to -4 |
| C. | By setting the OLE DB Services connection string keyword to -1 |
| D. | By setting the OLE DB Services connection string keyword to -7 |
| Answer» D. By setting the OLE DB Services connection string keyword to -7 | |
| 44. |
What determines the connection pool that a connection should use? 1. A connection string 2. The identity or credentials of the user opening the connection 3. The database being connected to 4. The connection object used to connect to the database |
| A. | 1, 2 |
| B. | 1, 2, 3 |
| C. | 1, 3 |
| D. | 1, 4 |
| Answer» B. 1, 2, 3 | |
| 45. |
When would you typically use an Input parameter? 1. When the parameter value is created based on user input 2. When the parameter is used to send data from the application to the database 3. When the command is set to execute a statement with a WHERE clause 4. When the parameter value is passed to an INSERT statement |
| A. | 1, 2 |
| B. | 1, 2, 3 |
| C. | 2, 3 |
| D. | 1, 4 |
| Answer» D. 1, 4 | |
| 46. |
If you are using the DataSet and you have to display the data in sorted order what will you do? |
| A. | Use Sort method of DataTable |
| B. | Use Sort method of DataSet |
| C. | Use DataViev object with each sort |
| D. | Use datapaging and sort the data. |
| Answer» D. Use datapaging and sort the data. | |
| 47. |
What property contains the actual error message returned by SQL Server? 1. SqlException.Source 2. SqlException.Message 3. SqlError.Class 4. SqlError.Message |
| A. | 1, 2 |
| B. | 1, 2, 3 |
| C. | 1, 3 |
| D. | 2, 4 |
| Answer» E. | |
| 48. |
You need to initialize some variable only when the first user accesses the application. What should you do? |
| A. | Add code to the Application_OnStart event handler in the Global.asax file. |
| B. | Add code to the Application_BeginRequest event handler in the Global.asax |
| C. | Add code to the Session_OnStart event handler in the Global.asax file |
| D. | None of the above |
| Answer» B. Add code to the Application_BeginRequest event handler in the Global.asax | |
| 49. |
In which Event you can set the value of a Theme? |
| A. | Page_Load |
| B. | Page_Render |
| C. | Page_PreRender |
| D. | Page_PreInit |
| Answer» E. | |
| 50. |
Which SqlCommand execution returns the value of the first column of the first row from a table? |
| A. | ExecuteNonQuery |
| B. | ExecuteReader |
| C. | ExecuteXmlReader |
| D. | ExecuteScalar |
| Answer» E. | |