wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

M-3 Practice

Total questions: 108

Worksheet time: 2hrs 48mins

Name
Class
Date
1.

What namespace is used for ASP.NET Web Form by default?

a)
System.Windows.Forms
b)
System.Web.UI.WebControls
c)
System.Net.Http
d)
System.Web.UI
2.

Which of the following attribute must be set on a validator control for the validation?

a)
ControlToValidate
b)
ErrorMessage
c)
Text
d)
ValidationGroup
3.

Which term is used for pages that depend on the Master page?

a)
Content Page
b)
Parent Page
c)
Main Page
d)
Template Page
4.

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

a)
onClick
b)
onLoad
c)
onSubmit
d)
onMouseOver
5.

Which of the following folder is used to store DLL files in the ASP.NET application?

a)
data
b)
resources
c)
lib
d)
bin
6.

Which of the following method is used to register client script using code dynamically?

a)
AddClientScript
b)
IncludeScript
c)
RegisterStartupScript
d)
RenderClientScript
7.

Which of the following is not an ASP.NET component?

a)
  1. LinkCounter

b)
  1. Counter

c)
  1. AdRotator

d)
  1. File Access

8.

Which development model(s) is/are supported by ASP.Net?

a)
Angular
b)
Web Forms, MVC, Web Pages
c)
React
d)
Vue
9.

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

a)
In-Process
b)
SQL Server
c)
State Server
d)
Out-of-Process
10.

The SessionIDs are stored in ____ by ASP.Net?

a)
local storage
b)
cookies
c)
databases
d)
sessions
11.

Which protocol is used to call a web service?

a)
HTTP
b)
SMTP
c)
SSH
d)
FTP
12.

Which method is used in ASP.Net to preserve page and control values between round trips?

a)
Session State
b)
Cookie
c)
Query String
d)
View State
13.

What is the full form of SOAP in ASP.Net?

a)
Simple Object Access Protocol
b)
Systematic Object Access Protocol
c)
Simple Object Application Protocol
d)
Structured Object Authentication Protocol
14.

What is the default timeout for a cookie in ASP.Net?

a)
20 minutes
b)
1 hour
c)
30 minutes
d)
15 minutes
15.

The Global.asax file is derived from the ____ class.

a)
HttpApplication
b)
HttpHandler
c)
HttpServer
d)
HttpRequest
16.

Which is not a page event in ASP.Net?

a)
OnInit
b)
OnStart
c)
OnRender
d)
OnLoad
17.

How many navigation controls are in ASP.NET?

a)
10
b)
3
c)
5
d)
7
18.

In ____ page processing transfers from one page to the other page without making a round-trip back to the client's browser.

a)
server-side
b)
browser-side
c)
client-side
d)
front-end
19.

____is used to redirect the user's browser to another page or site.

a)
document.url
b)
browser.redirect
c)
page.switch
d)
window.location
20.

Webforms are made up using?

a)
CSS
b)
JavaScript
c)
Python
d)
HTML
21.

IIS is a?

a)
database management system
b)
programming language
c)
operating system
d)
web server software
22.

Which of the following are server controls in ASP.NET?

  1. Button

  2. Textbox

  3. ImageButton

  4. LinkButton

a)
Button, Textbox, ImageButton, LinkButton
b)
DropdownList
c)
RadioButton
d)
CheckBox
23.

Which of the following statement is correct about AdRotator control?

a)
AdRotator control is used for database connection
b)
AdRotator control is used for user authentication
c)
AdRotator control is used to display a sequence of advertisement images or HTML content in a rotating manner on a web page.
d)
AdRotator control is used for form validation
24.

Which of the following are the correct application events for DataList control?

  1. Cancel Command

  2. Edit Command

  3. Delete Command

  4. Update Command

a)
Insert Command
b)
Edit Command, Delete Command, Update Command
c)
Select Command
d)
Refresh Command
25.

HTML controls are?

a)
Elements used to collect user input on a web page.
b)
Attributes for defining colors.
c)
Tags used for formatting text.
d)
Elements used to style a webpage.
26.

Which of the following control is used to resets all other HTML form elements on a form to a default value?

a)
reset
b)
restart
c)
refresh
d)
clear
27.

Which of the following statement are correct application events for Calendar control?

a)
Event Clicked
b)
Month Changed
c)
Year Render
d)
Selection Changed, Visible Month Changed, Day Render
28.

What are the two main architectures of ADO.NET?

a)

Connected Architecture

b)

Disconnected Architecture

29.

What is the purpose of the Connection Object in ADO.NET?

4 lines
30.

What is the role of the Command Class in ADO.NET?

a)

Execute SQL statements

b)

Fetch data from the database

31.

What is the purpose of the DataView in ADO.NET?

4 lines
32.

What is the significance of the ConnectionString property?

4 lines
33.

What does the ExecuteReader method do?

4 lines
34.

What is the DOK level of the question about the DataAdapter?

4 lines
35.

What is Data Binding in ASP.NET?

a)

The process of connecting data sources to server controls.

b)

A method to manually assign values to UI controls.

c)

A technique to display static data on a web page.

36.

What are the types of Data Binding in ASP.NET?

a)

Simple Data Binding, Complex Data Binding, Declarative Data Binding, Two-Way Data Binding

b)

Static Data Binding, Dynamic Data Binding

c)

Direct Data Binding, Indirect Data Binding

37.

What is SqlDataSource Control?

a)

An ASP.NET data source control used to connect to a SQL database.

b)

A control used to display data in a tabular format.

c)

A method for binding data to UI controls.

38.

What are the advantages of Data Binding?

a)

Reduces code, consistent and scalable, supports two-way communication, easy maintenance.

b)

Increases complexity, requires manual coding, limits data sources.

c)

None of the above.

39.

What is the first step in the Connected Model?

a)

Create and open SqlConnection.

b)

Create SqlCommand with SQL query.

c)

Execute using ExecuteReader().

40.

What is the purpose of the DataAdapter in ADO.NET?

a)

To bridge between DataSet and Database.

b)

To execute SQL queries.

c)

To connect to a database.

41.

What is the syntax for Data Binding Expressions?

a)

<%# Eval("ColumnName") %> for Read-Only and <%# Bind("ColumnName") %> for Two-Way.

b)

<%# Display("ColumnName") %> for Read-Only and <%# Update("ColumnName") %> for Two-Way.

c)

<%# Show("ColumnName") %> for Read-Only and <%# Modify("ColumnName") %> for Two-Way.

42.

What are the key classes in ADO.NET?

a)

Connection, Command, DataReader, DataAdapter, DataSet.

b)

Database, Table, Row, Column.

c)

None of the above.

43.

What is the main advantage of using Data-Bound Controls?

a)

Reduces manual coding and supports automatic data-binding.

b)

Increases manual coding and complexity.

c)

None of the above.

44.

What is the purpose of the ConnectionString property in SqlDataSource?

a)

Defines the connection to the database.

b)

Specifies the SQL query to execute.

c)

Indicates the data source type.

45.

What is ADO.NET primarily used for?

a)

Creating web applications

b)

Network communication

c)

Data access technology

d)

Designing user interfaces

46.

Which of the following is a key feature of ADO.NET?

a)

Direct database manipulation

b)

Single user access

c)

Disconnected data access

d)

Continuous database connection

47.

What does the DataSet in ADO.NET represent?

a)

A method for executing SQL commands

b)

A direct connection to the database

c)

An in-memory representation of data

d)

A single table of data

48.

Which class is used to establish a connection to SQL Server in ADO.NET?

a)

SqlConnection

b)

SqlDataAdapter

c)

SqlCommand

d)

SqlDataReader

49.

What is the purpose of the SqlDataSource control in ASP.NET?

a)

To manage application state

b)

To connect to a SQL database

c)

To handle user authentication

d)

To create user interfaces

50.

Which of the following is NOT a data provider in ADO.NET?

a)

OracleClient

b)

SqlClient

c)

OleDb

d)

MySQLClient

51.

What does the DataReader class provide?

a)

A way to bind data to UI controls

b)

A method for executing stored procedures

c)

A way to manipulate data offline

d)

Fast, forward-only access to data

52.

Which method is used to read XML data in ADO.NET?

a)

ReadXml()

b)

WriteXml()

c)

FetchXml()

d)

LoadXml()

53.

What is a primary benefit of using strongly typed datasets?

a)

Faster data retrieval

b)

Easier debugging

c)

Reduced memory usage

d)

Type safety and compile-time checking

54.

What does the AllowPaging property do in a GridView control?

a)

Enables sorting of records

b)

Allows users to navigate through pages of data

c)

Displays data in a vertical format

d)

Automatically generates columns

55.

Which control is best for displaying a single record's details?

a)

FormView

b)

DetailsView

c)

ListView

d)

GridView

56.

What is the purpose of using ObjectDataSource?

a)

To connect directly to a database

b)

To execute SQL commands

c)

To bind UI controls to business objects

d)

To manage user sessions

57.

Which of the following is a limitation of SqlDataSource?

a)

Easy to bind with controls

b)

Not suitable for complex queries

c)

Minimal coding required

d)

Supports CRUD operations

58.

What does the AutoGenerateEditButton property do in a GridView?

a)

Generates a new data source

b)

Automatically creates edit buttons for each row

c)

Allows for data filtering

d)

Enables automatic sorting of data

59.

Which of the following is a feature of ADO.NET's disconnected architecture?

a)

Increases server load

b)

Supports only single-user access

c)

Requires constant database connection

d)

Allows offline data manipulation

60.

What is the main advantage of using parameterized queries?

a)

Automatic data binding

b)

Easier to read code

c)

Prevention of SQL Injection

d)

Improved performance

61.

Which control allows for full customization of layout using templates?

a)

ListView

b)

FormView

c)

DetailsView

d)

GridView

62.

What is the role of the DataProvider in ADO.NET architecture?

a)

To manage user sessions

b)

To handle application logic

c)

To connect to the database and execute commands

d)

To display data in UI controls

63.

Which of the following is a use case for ADO.NET?

a)

Creating a mobile application

b)

Building a web portal for student results

c)

Designing a game

d)

Developing a desktop application

64.

What is Entity Framework Core?

a)

A programming language

b)

A lightweight, extensible, open-source ORM

c)

A database management system

d)

A web development framework

65.

Which of the following is a purpose of an object-relational mapper?

a)

To write raw SQL queries

b)

To enable developers to work with databases using .NET objects

c)

To create web applications

d)

To manage user interfaces

66.

What does the DbContext do in EF Core?

a)

It generates SQL queries

b)

It handles file I/O operations

c)

It manages entity objects and database connections

d)

It creates user interfaces

67.

Which command is used to create a migration in EF Core?

a)

Generate-Migration

b)

Create-Migration

c)

Add-Migration

d)

Update-Database

68.

What is the main benefit of using EF Core?

a)

It requires extensive SQL knowledge

b)

It eliminates the need for most data-access code

c)

It is limited to Windows only

d)

It is a paid software

69.

Which of the following is NOT a database provider supported by EF Core?

a)

SQL Server

b)

PostgreSQL

c)

Oracle DB

d)

MySQL

70.

What is the purpose of migrations in EF Core?

a)

To delete the database

b)

To manage user permissions

c)

To create new databases

d)

To modify the data model and apply changes to the database

71.

What does the Change Tracker do in EF Core?

a)

It manages database connections

b)

It tracks changes made to entities

c)

It generates SQL queries

d)

It creates user interfaces

72.

Which of the following describes the Application Layer in EF Core?

a)

It tracks changes to entities

b)

It defines how entity classes map to database structures

c)

It manages database connections

d)

It is where app logic interacts with EF Core

73.

What is the first step in creating a Console App with EF Core?

a)

Run the application

b)

Add entity classes

c)

Create a new Console App C#

d)

Install the .NET SDK

74.

What is the role of the Query Pipeline in EF Core?

a)

To create migrations

b)

To translate LINQ queries into SQL queries

c)

To track changes to entities

d)

To manage database connections

75.

What is the significance of the 'Update-Database' command?

a)

It generates SQL queries

b)

It creates a new migration

c)

It applies migrations to the database

d)

It deletes the database

76.

Which version of Entity Framework was introduced in 2008?

a)

EF 4

b)

EF 5

c)

EF 6

d)

EF Core

77.

What does EF Core allow developers to do?

a)

Write raw SQL for every operation

b)

Work with databases using .NET objects

c)

Only work on Windows

d)

Create web applications

78.

What is the purpose of the Model in EF Core?

a)

To generate SQL queries

b)

To define how entity classes map to database structures

c)

To manage database connections

d)

To track changes to entities

79.

Which command is used to view the data visually in Visual Studio?

a)

Edit > Find

b)

Tools > Manage NuGet Packages

c)

File > Open

d)

View > SQL Server Object Explorer

80.

What is the main function of the Student.cs file?

a)

To create migrations

b)

To generate SQL queries

c)

To model the core business concept 'Student'

d)

To manage database connections

81.

What does the term 'code first' refer to in EF Core?

a)

Creating migrations automatically

b)

Writing code to define the database structure

c)

Using existing databases without changes

d)

Creating the database before writing code

82.

What is the main advantage of using an ORM like EF Core?

a)

It simplifies data access and management

b)

It requires manual SQL coding

c)

It is limited to Windows

d)

It is only for large applications

83.

What is the purpose of the 'Add-Migration' command?

a)

To view data in the database

b)

To delete existing migrations

c)

To apply changes to the database

d)

To create a new migration file

84.

Which of the following is a feature of EF Core?

a)

It requires extensive SQL knowledge

b)

It is a paid software

c)

It supports cross-platform development

d)

It is only available on Windows

85.

What does EF Core use to translate LINQ queries?

a)

Model

b)

DbContext

c)

Change Tracker

d)

Query Pipeline

86.

What is the first step to install Entity Framework Core?

a)

Create a new project

b)

Run the application

c)

Select Tools > Manage NuGet Packages

d)

Add entity classes

87.

What is the role of database providers in EF Core?

a)

To track changes to entities

b)

To generate SQL queries

c)

To manage user interfaces

d)

To allow EF Core to work with different databases

88.

What is the significance of the 'SchoolContext.cs' file?

a)

It is the main entry point of the application

b)

It exposes tables via DbSet<> and manages database connections

c)

It generates SQL queries

d)

It tracks changes to entities

89.

What is ASP.NET Core?

a)

A server-side web application framework

b)

A client-side JavaScript framework

c)

A database management system

d)

A front-end design tool

90.

Which of the following is a feature of ASP.NET Core?

a)

Cross-platform support

b)

Single language support

c)

Front-end rendering only

d)

Not open-source

91.

What is the use of middleware in ASP.NET Core?

a)

To manage client-side requests

b)

To handle database queries

c)

To define how HTTP requests are handled

d)

To create API endpoints

92.

Which programming languages can be used with ASP.NET Core?

a)

Java and PHP

b)

C# and F#

c)

Python and Ruby

d)

Swift and Kotlin

93.

What does the Razor View Engine do in ASP.NET Core?

a)

Manages server-side databases

b)

Renders JavaScript components

c)

Parses Razor markup and produces HTML responses

d)

Compiles C# code into machine code

94.

What is the purpose of the `Startup.cs` file in an ASP.NET Core project?

a)

To configure how the application starts

b)

To store user credentials

c)

To define routing for the application

d)

To run database migrations

95.

What does the term "cross-platform" mean in the context of ASP.NET Core?

a)

It can only run on Windows

b)

It can run on multiple operating systems

c)

It can only run on Linux

d)

It can run without a server

96.

What is Entity Framework Core in ASP.NET Core?

a)

A UI framework

b)

A front-end framework

c)

An ORM (Object-Relational Mapper)

d)

A CSS framework

97.

What does MVC stand for in ASP.NET Core MVC?

a)

Main View Controller

b)

Model View Controller

c)

Managed View Code

d)

Modular Visual Control

98.

What type of applications can be built using ASP.NET Core?

a)

Web APIs

b)

Web Apps

c)

Real-time apps

d)

All of the above

99.

What is the purpose of the `wwwroot` folder in an ASP.NET Core project?

a)

To store server-side code

b)

To store static files like CSS, JavaScript, and images

c)

To store configuration files

d)

To store database files

100.

What does the `.csproj` file manage in an ASP.NET Core ?

a)

The project's folder structure

b)

Project dependencies and configuration settings

c)

Database connection strings

d)

Client-side libraries

101.

What is a controller's role in an MVC-based ASP.NET Core application?

a)

To handle HTTP requests and return responses

b)

To manage static files

c)

To define the database schema

d)

To write client-side JavaScript

102.

How can you specify routes in an ASP.NET Core application using attribute routing?

a)

By modifying the `wwwroot` folder

b)

By adding attributes like `[Route]` to the controller methods

c)

By configuring `launchSettings.json`

d)

By modifying the `csproj` file

103.

What file extension is used for Razor views in ASP.NET Core?

a)

.html

b)

.razor

c)

.cshtml

d)

.xml

104.

Which of the following is the entry point of an ASP.NET Core application?

a)

HomeController.cs

b)

Program.cs

c)

appsettings.json

d)

wwwroot folder

105.

What is the default action method in a controller?

a)

Start()

b)

Load()

c)

Index()

d)

Init()

106.

From which version were .NET and .NET Core merged into a single platform?

a)

.NET 4.0

b)

.NET 5.0

c)

.NET 6.0

d)

.NET 7.0

107.

What is the main disadvantage of .NET compared to .NET Core ?

a)

.NET Framework is limited to running only on Windows

b)

.NET Framework has better performance than .NET Core

c)

.NET Framework supports cross-platform development

d)

.NET Framework is lightweight and optimized for cloud environments

108.

What is one key advantage of ASP.NET Core compared to other popular web frameworks like Django, Flask, or Ruby on Rails?

a)

ASP.NET Core provides better cross-platform support than other web frameworks

b)

ASP.NET Core offers built-in dependency injection and a highly modular architecture

c)

ASP.NET Core lacks community support compared to other web frameworks.

d)

ASP.NET Core is slower in performance compared to Django and Ruby on Rails.