ASP.Net MCQ Quiz Hub

ASP.Net Mcq Question Set 5

Choose a topic to test your knowledge and improve your ASP.Net skills

Which of the following are reference types?





✅ Correct Answer: 4

Why should you write the cleanup code in Finally block?





✅ Correct Answer: 3

When the garbage collector runs.





✅ Correct Answer: 1

Which of the following is true ? 1. AJAX is a platform-independent technology 2. AJAX can work with web application 3. AJAX can only work with ASP.NET 4. AJAX is a platform-dependent technology





✅ Correct Answer: 1

Which control is required for every page that have AJAX Extensions for ASP.NET?





✅ Correct Answer: 2

AnUpdatePanel control defined on a page. Button control is placed outside of the UpdatePanel. How to cause the UpdatePanel to execute an update.





✅ Correct Answer: 4

Which method is used to dynamically register client script from code?





✅ Correct Answer: 1

Which interface you will use wrap an AJAX client control into a custom server control?





✅ Correct Answer: 1

What is jQuery? 1. jQuery is an open source library 2. It works client side. 3. jQuery is java technology.





✅ Correct Answer: 1

If you must use a user name and password to connect to a database, where should you store the sensitive information?





✅ Correct Answer: 2

What is the recommended method for securing sensitive connection string information?





✅ Correct Answer: 3

What are the element of code access security?





✅ Correct Answer: 2

What is Caspol?





✅ Correct Answer: 4

Which data provider gives the maximum performance from a connection to SQL Server?





✅ Correct Answer: 3

Which CommandType value is incorrect?





✅ Correct Answer: 3

Which SqlCommand execution returns the value of the first column of the first row from a table?





✅ Correct Answer: 4

Which SqlCommand execution returns the number of effected records in the table?





✅ Correct Answer: 1

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





✅ Correct Answer: 2

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





✅ Correct Answer: 4

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.





✅ Correct Answer: 3

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





✅ Correct Answer: 1

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





✅ Correct Answer: 3

How do I explicitly turn on connection pooling for an OLE DB data source?





✅ Correct Answer: 3

What property contains the actual error message returned by SQL Server? 1. SqlException.Source 2. SqlException.Message 3. SqlError.Class 4. SqlError.Message





✅ Correct Answer: 4

What is the connection string’s key / value pair for using WindowsAuthentication in SQLServer 2000 and SQL Server 2005?





✅ Correct Answer: 3

What are the Command object property settings to execute a stored procedure? 1. CommandType = Text, CommandText = stored procedure name 2. CommandType= Text, CommandText = SQL syntax to execute the stored procedure 3. CommandType = StoredProcedure, CommandText = SQL syntax to execute the stored procedure 4. CommandType = StoredProcedure, CommandText = stored procedure name





✅ Correct Answer: 3

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.





✅ Correct Answer: 4

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





✅ Correct Answer: 3

What are the three primary kinds of parameters?





✅ Correct Answer: 4

How do you determine the actual SQL data type of a SqlParameter (the type expected by the SQL Server)?





✅ Correct Answer: 2

Which of the following is true?





✅ Correct Answer: 4

If you are using the DataSet and you have to display the data in sorted order what will you do?





✅ Correct Answer: 3

In which Event you can set the value of a Theme?





✅ Correct Answer: 4

You need to initialize some variable only when the first user accesses the application. What should you do?





✅ Correct Answer: 1

Which of the following template supports by Repeater control?





✅ Correct Answer: 4

Which of the following works on client side?





✅ Correct Answer: 4

Which of the following works on server side?





✅ Correct Answer: 3

Application_Start event is available in which file?





✅ Correct Answer: 1

You have to log the data into database if your session times out. Which event you will use?





✅ Correct Answer: 1

Which of the following is true when referencing master page from content page?





✅ Correct Answer: 3

If you are using Webparts in your web page then which control is necessary?





✅ Correct Answer: 2

What component do you need to enable for a user to add new web parts?





✅ Correct Answer: 2

Which of the following are required to enable users to change the title of web part?





✅ Correct Answer: 3

What is the file extension of web service in ASP.NET?





✅ Correct Answer: 2

If you want to access a web service method, which attribute it must have?





✅ Correct Answer: 1

Range Validator control in ASP.NET supports which type?





✅ Correct Answer: 4

If you are using user control in ASP.NET page which directory will be used?





✅ Correct Answer: 1

A web application can contain ____





✅ Correct Answer: 3

What is the last event of web page life cycle?





✅ Correct Answer: 4

ByDefault ASP.Net SessionID is stored in _____





✅ Correct Answer: 3