Font size
WorksheetsM-3 Practice
Total questions: 108
Worksheet time: 2hrs 48mins
What namespace is used for ASP.NET Web Form by default?
Which of the following attribute must be set on a validator control for the validation?
Which term is used for pages that depend on the Master page?
Which of the following is not an ASP.NET event?
Which of the following folder is used to store DLL files in the ASP.NET application?
Which of the following method is used to register client script using code dynamically?
Which of the following is not an ASP.NET component?
LinkCounter
Counter
AdRotator
File Access
Which development model(s) is/are supported by ASP.Net?
Which of the following Session Mode Serialization is not required to store the data?
The SessionIDs are stored in ____ by ASP.Net?
Which protocol is used to call a web service?
Which method is used in ASP.Net to preserve page and control values between round trips?
What is the full form of SOAP in ASP.Net?
What is the default timeout for a cookie in ASP.Net?
The Global.asax file is derived from the ____ class.
Which is not a page event in ASP.Net?
How many navigation controls are in ASP.NET?
In ____ page processing transfers from one page to the other page without making a round-trip back to the client's browser.
____is used to redirect the user's browser to another page or site.
Webforms are made up using?
IIS is a?
Which of the following are server controls in ASP.NET?
Button
Textbox
ImageButton
LinkButton
Which of the following statement is correct about AdRotator control?
Which of the following are the correct application events for DataList control?
Cancel Command
Edit Command
Delete Command
Update Command
HTML controls are?
Which of the following control is used to resets all other HTML form elements on a form to a default value?
Which of the following statement are correct application events for Calendar control?
What are the two main architectures of ADO.NET?
Connected Architecture
Disconnected Architecture
What is the purpose of the Connection Object in ADO.NET?
What is the role of the Command Class in ADO.NET?
Execute SQL statements
Fetch data from the database
What is the purpose of the DataView in ADO.NET?
What is the significance of the ConnectionString property?
What does the ExecuteReader method do?
What is the DOK level of the question about the DataAdapter?
What is Data Binding in ASP.NET?
The process of connecting data sources to server controls.
A method to manually assign values to UI controls.
A technique to display static data on a web page.
What are the types of Data Binding in ASP.NET?
Simple Data Binding, Complex Data Binding, Declarative Data Binding, Two-Way Data Binding
Static Data Binding, Dynamic Data Binding
Direct Data Binding, Indirect Data Binding
What is SqlDataSource Control?
An ASP.NET data source control used to connect to a SQL database.
A control used to display data in a tabular format.
A method for binding data to UI controls.
What are the advantages of Data Binding?
Reduces code, consistent and scalable, supports two-way communication, easy maintenance.
Increases complexity, requires manual coding, limits data sources.
None of the above.
What is the first step in the Connected Model?
Create and open SqlConnection.
Create SqlCommand with SQL query.
Execute using ExecuteReader().
What is the purpose of the DataAdapter in ADO.NET?
To bridge between DataSet and Database.
To execute SQL queries.
To connect to a database.
What is the syntax for Data Binding Expressions?
<%# Eval("ColumnName") %> for Read-Only and <%# Bind("ColumnName") %> for Two-Way.
<%# Display("ColumnName") %> for Read-Only and <%# Update("ColumnName") %> for Two-Way.
<%# Show("ColumnName") %> for Read-Only and <%# Modify("ColumnName") %> for Two-Way.
What are the key classes in ADO.NET?
Connection, Command, DataReader, DataAdapter, DataSet.
Database, Table, Row, Column.
None of the above.
What is the main advantage of using Data-Bound Controls?
Reduces manual coding and supports automatic data-binding.
Increases manual coding and complexity.
None of the above.
What is the purpose of the ConnectionString property in SqlDataSource?
Defines the connection to the database.
Specifies the SQL query to execute.
Indicates the data source type.
What is ADO.NET primarily used for?
Creating web applications
Network communication
Data access technology
Designing user interfaces
Which of the following is a key feature of ADO.NET?
Direct database manipulation
Single user access
Disconnected data access
Continuous database connection
What does the DataSet in ADO.NET represent?
A method for executing SQL commands
A direct connection to the database
An in-memory representation of data
A single table of data
Which class is used to establish a connection to SQL Server in ADO.NET?
SqlConnection
SqlDataAdapter
SqlCommand
SqlDataReader
What is the purpose of the SqlDataSource control in ASP.NET?
To manage application state
To connect to a SQL database
To handle user authentication
To create user interfaces
Which of the following is NOT a data provider in ADO.NET?
OracleClient
SqlClient
OleDb
MySQLClient
What does the DataReader class provide?
A way to bind data to UI controls
A method for executing stored procedures
A way to manipulate data offline
Fast, forward-only access to data
Which method is used to read XML data in ADO.NET?
ReadXml()
WriteXml()
FetchXml()
LoadXml()
What is a primary benefit of using strongly typed datasets?
Faster data retrieval
Easier debugging
Reduced memory usage
Type safety and compile-time checking
What does the AllowPaging property do in a GridView control?
Enables sorting of records
Allows users to navigate through pages of data
Displays data in a vertical format
Automatically generates columns
Which control is best for displaying a single record's details?
FormView
DetailsView
ListView
GridView
What is the purpose of using ObjectDataSource?
To connect directly to a database
To execute SQL commands
To bind UI controls to business objects
To manage user sessions
Which of the following is a limitation of SqlDataSource?
Easy to bind with controls
Not suitable for complex queries
Minimal coding required
Supports CRUD operations
What does the AutoGenerateEditButton property do in a GridView?
Generates a new data source
Automatically creates edit buttons for each row
Allows for data filtering
Enables automatic sorting of data
Which of the following is a feature of ADO.NET's disconnected architecture?
Increases server load
Supports only single-user access
Requires constant database connection
Allows offline data manipulation
What is the main advantage of using parameterized queries?
Automatic data binding
Easier to read code
Prevention of SQL Injection
Improved performance
Which control allows for full customization of layout using templates?
ListView
FormView
DetailsView
GridView
What is the role of the DataProvider in ADO.NET architecture?
To manage user sessions
To handle application logic
To connect to the database and execute commands
To display data in UI controls
Which of the following is a use case for ADO.NET?
Creating a mobile application
Building a web portal for student results
Designing a game
Developing a desktop application
What is Entity Framework Core?
A programming language
A lightweight, extensible, open-source ORM
A database management system
A web development framework
Which of the following is a purpose of an object-relational mapper?
To write raw SQL queries
To enable developers to work with databases using .NET objects
To create web applications
To manage user interfaces
What does the DbContext do in EF Core?
It generates SQL queries
It handles file I/O operations
It manages entity objects and database connections
It creates user interfaces
Which command is used to create a migration in EF Core?
Generate-Migration
Create-Migration
Add-Migration
Update-Database
What is the main benefit of using EF Core?
It requires extensive SQL knowledge
It eliminates the need for most data-access code
It is limited to Windows only
It is a paid software
Which of the following is NOT a database provider supported by EF Core?
SQL Server
PostgreSQL
Oracle DB
MySQL
What is the purpose of migrations in EF Core?
To delete the database
To manage user permissions
To create new databases
To modify the data model and apply changes to the database
What does the Change Tracker do in EF Core?
It manages database connections
It tracks changes made to entities
It generates SQL queries
It creates user interfaces
Which of the following describes the Application Layer in EF Core?
It tracks changes to entities
It defines how entity classes map to database structures
It manages database connections
It is where app logic interacts with EF Core
What is the first step in creating a Console App with EF Core?
Run the application
Add entity classes
Create a new Console App C#
Install the .NET SDK
What is the role of the Query Pipeline in EF Core?
To create migrations
To translate LINQ queries into SQL queries
To track changes to entities
To manage database connections
What is the significance of the 'Update-Database' command?
It generates SQL queries
It creates a new migration
It applies migrations to the database
It deletes the database
Which version of Entity Framework was introduced in 2008?
EF 4
EF 5
EF 6
EF Core
What does EF Core allow developers to do?
Write raw SQL for every operation
Work with databases using .NET objects
Only work on Windows
Create web applications
What is the purpose of the Model in EF Core?
To generate SQL queries
To define how entity classes map to database structures
To manage database connections
To track changes to entities
Which command is used to view the data visually in Visual Studio?
Edit > Find
Tools > Manage NuGet Packages
File > Open
View > SQL Server Object Explorer
What is the main function of the Student.cs file?
To create migrations
To generate SQL queries
To model the core business concept 'Student'
To manage database connections
What does the term 'code first' refer to in EF Core?
Creating migrations automatically
Writing code to define the database structure
Using existing databases without changes
Creating the database before writing code
What is the main advantage of using an ORM like EF Core?
It simplifies data access and management
It requires manual SQL coding
It is limited to Windows
It is only for large applications
What is the purpose of the 'Add-Migration' command?
To view data in the database
To delete existing migrations
To apply changes to the database
To create a new migration file
Which of the following is a feature of EF Core?
It requires extensive SQL knowledge
It is a paid software
It supports cross-platform development
It is only available on Windows
What does EF Core use to translate LINQ queries?
Model
DbContext
Change Tracker
Query Pipeline
What is the first step to install Entity Framework Core?
Create a new project
Run the application
Select Tools > Manage NuGet Packages
Add entity classes
What is the role of database providers in EF Core?
To track changes to entities
To generate SQL queries
To manage user interfaces
To allow EF Core to work with different databases
What is the significance of the 'SchoolContext.cs' file?
It is the main entry point of the application
It exposes tables via DbSet<> and manages database connections
It generates SQL queries
It tracks changes to entities
What is ASP.NET Core?
A server-side web application framework
A client-side JavaScript framework
A database management system
A front-end design tool
Which of the following is a feature of ASP.NET Core?
Cross-platform support
Single language support
Front-end rendering only
Not open-source
What is the use of middleware in ASP.NET Core?
To manage client-side requests
To handle database queries
To define how HTTP requests are handled
To create API endpoints
Which programming languages can be used with ASP.NET Core?
Java and PHP
C# and F#
Python and Ruby
Swift and Kotlin
What does the Razor View Engine do in ASP.NET Core?
Manages server-side databases
Renders JavaScript components
Parses Razor markup and produces HTML responses
Compiles C# code into machine code
What is the purpose of the `Startup.cs` file in an ASP.NET Core project?
To configure how the application starts
To store user credentials
To define routing for the application
To run database migrations
What does the term "cross-platform" mean in the context of ASP.NET Core?
It can only run on Windows
It can run on multiple operating systems
It can only run on Linux
It can run without a server
What is Entity Framework Core in ASP.NET Core?
A UI framework
A front-end framework
An ORM (Object-Relational Mapper)
A CSS framework
What does MVC stand for in ASP.NET Core MVC?
Main View Controller
Model View Controller
Managed View Code
Modular Visual Control
What type of applications can be built using ASP.NET Core?
Web APIs
Web Apps
Real-time apps
All of the above
What is the purpose of the `wwwroot` folder in an ASP.NET Core project?
To store server-side code
To store static files like CSS, JavaScript, and images
To store configuration files
To store database files
What does the `.csproj` file manage in an ASP.NET Core ?
The project's folder structure
Project dependencies and configuration settings
Database connection strings
Client-side libraries
What is a controller's role in an MVC-based ASP.NET Core application?
To handle HTTP requests and return responses
To manage static files
To define the database schema
To write client-side JavaScript
How can you specify routes in an ASP.NET Core application using attribute routing?
By modifying the `wwwroot` folder
By adding attributes like `[Route]` to the controller methods
By configuring `launchSettings.json`
By modifying the `csproj` file
What file extension is used for Razor views in ASP.NET Core?
.html
.razor
.cshtml
.xml
Which of the following is the entry point of an ASP.NET Core application?
HomeController.cs
Program.cs
appsettings.json
wwwroot folder
What is the default action method in a controller?
Start()
Load()
Index()
Init()
From which version were .NET and .NET Core merged into a single platform?
.NET 4.0
.NET 5.0
.NET 6.0
.NET 7.0
What is the main disadvantage of .NET compared to .NET Core ?
.NET Framework is limited to running only on Windows
.NET Framework has better performance than .NET Core
.NET Framework supports cross-platform development
.NET Framework is lightweight and optimized for cloud environments
What is one key advantage of ASP.NET Core compared to other popular web frameworks like Django, Flask, or Ruby on Rails?
ASP.NET Core provides better cross-platform support than other web frameworks
ASP.NET Core offers built-in dependency injection and a highly modular architecture
ASP.NET Core lacks community support compared to other web frameworks.
ASP.NET Core is slower in performance compared to Django and Ruby on Rails.
