🧪 ASP.Net MCQ Quiz Hub

ASP.Net Mcq Question Set 3

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

You are developing a Web page that contains many validated controls. You want to provide a detailed message for each validation error, but the page doesn’t have sufficient space to provide the detailed message next to each control. What can you do to indicate an error at the control and list the detailed error messages at the top of the Web page?





✅ Correct Answer: 2

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?





✅ Correct Answer: 3

You are writing a page that contains an UpdatePanel for partial-page updates. You want that user should get the message “Processing is going on, please wait.” that the update is processing only if the update takes longer than 5 seconds. Which actions should you take?





✅ Correct Answer: 2

What are the basic steps to reference master page properties from a content page?





✅ Correct Answer: 1

Which ADO.NET class provide Connected Environment?





✅ Correct Answer: 1

Match the following List 1 to List 2 a. App_Code ------------------------ i. Assembly Resource Files (.resx) b. App_Data ------------------------ ii. .skin file, CSS files c. App_Themes -------------------- iii. .mdf file, .mdb file d. App_GlobalResources --------- iv. .wsdl files, typed datasets





✅ Correct Answer: 1

In ASP.NET application DLL files are stored in which folder?





✅ Correct Answer: 3

What types of data can you store in the Cache collection?





✅ Correct Answer: 2

How many types of parameter supported by OutputCache?





✅ Correct Answer: 4

You want to secure the connection strings contained within your Web.config file to ensure that no one can open the file easily and see the connection information. Which tool must you use to encrypt the connection strings?





✅ Correct Answer: 3

What are the three primary kinds of parameters are used while working with the Stored Procedure in ASP.NET?





✅ Correct Answer: 3

How do you execute multiple SQL statements using a DataReader?





✅ Correct Answer: 2

When a User’s Session times out which event should you respond to?





✅ Correct Answer: 2

Which of the following Web.config files correctly enables the Web application to track the LastVisit of anonymous users in a variable of type DateTime?





✅ Correct Answer: 3

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 implement this solution on a single Web page?





✅ Correct Answer: 3

Match the following List 1 (Controls) to List 2. a. Image ------------------------- i. Navigate, PostBack, Inactive HotSpotMode b. ImageButton ---------------- ii. Container control c. ImageMap ------------------- iii. Has command event d. MultiView ------------------- iv. Does not have click event





✅ Correct Answer: 1

What are the steps to create a DataTable programmatically?





✅ Correct Answer: 1

The three statements are given below about DataSet and DataReader, choose the correct option according to the statement. Statement 1: DataSet Provides Disconnected environment but DataReader provides Connected environment. Statement 2: DataSet Provides Connected environment but DataReader provides Disconnected environment. Statement 3: DataSet Can store multiple table simultaneously but DataReader Supports a single table based on a single SQL query.





✅ Correct Answer: 4

The following group profile properties defined under a group name in Web.config file. How will you access Street and City property? <properties> <group name="Address"> <add name="Street" /> <add name="City" /> </group> </properties>





✅ Correct Answer: 2

The UpdatePanel supports two types of triggers: AsyncPostBackTrigger and PostBackTrigger. Choose the correct option regarding working of these triggers.





✅ Correct Answer: 4

To implement a specified .NET Framework interface which directive is used?





✅ Correct Answer: 4

Which of the following is not an ASP.NET page event?





✅ Correct Answer: 3

How will you store and retrieve value in viewstate?





✅ Correct Answer: 3

Which file is used to write the code to respond to the Application_Start event?





✅ Correct Answer: 3

What is the difference between a Local Transaction and a Distributed Transaction?





✅ Correct Answer: 3

Choose the correct option about DataReader object.





✅ Correct Answer: 4

How do you create a TextBox for retrieving a password from a user?





✅ Correct Answer: 4

What is/are the advantages of StateServer session mode?





✅ Correct Answer: 4

What is/are the advantages of Session State?





✅ Correct Answer: 4

Choose the correct option about DataSet object.





✅ Correct Answer: 4

You are a Web developer for CareerRide. The data is stored in a Microsoft SQL Server 2005 database on a server named CareerPC and the Database name is TestDB. You connect to TestDB by using Windows Integrated authentication. You use a SqlConnection object to connect to the database. You need to create a connection string to TestDB in the instance of SQL Server named CareerPC. Which string should you use?





✅ Correct Answer: 4

Match the following List 1 with List 2: a. Control ------------------ i. Controls the output caching policies of a page or user control. b. MasterType ------------ ii. Page directive uses with user controls. c. PreviousPageType ---- iii. Enables an ASP.NET page to work with a postback from another page in the application. d. OutputCache ----------- iv. Associates a class name to a page to get references or members contained within the specified master page.





✅ Correct Answer: 4

ASP.NET Validation Control works at ____





✅ Correct Answer: 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?





✅ Correct Answer: 4

What is the easiest way in Design view to create an event handler for the default event of a server control?





✅ Correct Answer: 4

What are the types of Web Server Button Controls that can be created?





✅ Correct Answer: 3

Clicking a CheckBox does not cause an automatic PostBack. How do you make the CheckBox cause an automatic PostBack?





✅ Correct Answer: 1

What happen in the Web Page when Init event occur?





✅ Correct Answer: 2

If you want that command object should returns XML data then which method of Command Object will be used?





✅ Correct Answer: 3

Match the following List 1 to List 2: a. UpdatePanel ------------------ i. If Master Page contains a ScriptManager then content page will use this control. b. UpdateProgress -------------- ii. ContentTemplate c. Timer -------------------------- iii. ProgressTemplate d. ScriptManagerProxy -------- iv. Tick Event





✅ Correct Answer: 2

Windows-Based Authentication is well suited for ______





✅ Correct Answer: 1

What are the minimum attribute is required to create a connection string using SqlConnection object?





✅ Correct Answer: 3

What datatype is returned when calling the ExecuteScalar method of a command object?





✅ Correct Answer: 2

Which programming model should you implement if you want to separate your server-side code from your client-side layout code in a Web page?





✅ Correct Answer: 2

Which object in ASP.NET provides a global storage mechanism for state data that needs to be accessible to all pages in a given Web application?





✅ Correct Answer: 2

Which Session Mode Serialization is not required to store the data?





✅ Correct Answer: 2

You are a Web developer for CareerRide. The data is stored in a Microsoft SQL Server 2005 database on a server named CareerPC and the Database name is TestDB. There is one GridView control on the page that you want to fill with table name Employee. Suppose that SqlConnection object is conObj and SqlCommand Object object is cmdObj. Which important properties of command object you will initialize to achieve this task?





✅ Correct Answer: 3

How will you create the SQL Server Connection Objects in Code? Choose the correct option.





✅ Correct Answer: 4

Choose the correct option about Master Page and Theme.





✅ Correct Answer: 4

When should you use HTML Server control rather than Web Server controls?





✅ Correct Answer: 4