ASP.NET with VB.NET is a powerful framework for building dynamic and scalable web applications. This quiz will help you test and enhance your knowledge of ASP.NET fundamentals, WebForms, and MVC architecture.
MCQs
Building Web Applications
What is the primary purpose of ASP.NET? a) To build Windows applications b) To build web applications c) To build mobile applications d) To build console applications
Which of the following is a key feature of ASP.NET? a) Server-side execution b) Client-side execution c) Windows-based user interfaces d) None of the above
What is the default file extension for an ASP.NET page? a) .aspx b) .html c) .php d) .css
Which protocol is primarily used in ASP.NET for communication between the server and browser? a) HTTP b) FTP c) SMTP d) POP3
What is the purpose of the Global.asax file in an ASP.NET application? a) To configure the database b) To handle session and application events c) To store user data d) To create reports
Which of the following is used to manage state in ASP.NET web applications? a) Session b) Cookies c) ViewState d) All of the above
How are ASP.NET web applications typically deployed? a) Through an executable file b) By copying files to the web server c) By sending them through email d) By using FTP only
What is the purpose of the Page_Load method in an ASP.NET page? a) To handle button clicks b) To define how the page is rendered c) To load data from a database d) To handle page initialization
Which control is used in ASP.NET to allow the user to input data? a) GridView b) TextBox c) Button d) Label
Which of the following is NOT a valid ASP.NET page directive? a) @Page b) @Control c) @Assembly d) @Master
Working with WebForms
What is the function of WebForms in ASP.NET? a) To create static web pages b) To create dynamic web pages c) To create databases d) To create APIs
What is the default method for handling form submissions in ASP.NET WebForms? a) GET b) POST c) PUT d) DELETE
Which control in ASP.NET WebForms is used to display tabular data? a) DataGrid b) Label c) Button d) TextBox
What is the primary difference between a WebForms page and a regular HTML page? a) WebForms uses server-side code for interaction b) WebForms pages are always static c) WebForms pages do not support databases d) WebForms pages require JavaScript
What is the purpose of the <%: %> syntax in ASP.NET WebForms? a) To declare variables b) To output encoded data c) To insert JavaScript d) To define a class
Which control is used for validation in ASP.NET WebForms? a) RequiredFieldValidator b) ValidationSummary c) CustomValidator d) All of the above
How does ViewState work in WebForms? a) It stores data on the server b) It stores data in the browser c) It is used to store session data d) It is used for query string values
What happens when a WebForms page is posted back? a) The page reloads without any data b) ViewState is used to maintain data across requests c) Data is lost d) The page is destroyed
Which event occurs first in the ASP.NET WebForms lifecycle? a) Page_Load b) Page_Init c) Page_PreRender d) Page_Render
What is the use of the UpdatePanel control in WebForms? a) To update data in a table b) To perform partial page updates without reloading c) To manage database connections d) To add custom error pages
Introduction to MVC Architecture
What does MVC stand for in the context of web development? a) Model, View, Controller b) Model, View, Component c) Module, View, Controller d) Method, View, Controller
Which part of the MVC architecture is responsible for handling user input and updating the model? a) Model b) View c) Controller d) None of the above
In MVC, which component is responsible for displaying data to the user? a) Model b) View c) Controller d) Service
What is the main advantage of using the MVC pattern in web development? a) Easier to maintain and test code b) Faster application development c) Simplified database management d) Improved security
Which file extension is commonly used for MVC views in ASP.NET? a) .aspx b) .html c) .cshtml d) .php
What is the role of the “Controller” in the MVC architecture? a) To handle user input and update the model b) To display data to the user c) To define the layout of the page d) To manage database connections
How is routing handled in an ASP.NET MVC application? a) By using the RouteConfig file b) By configuring URL patterns c) By using default routes d) All of the above
What is the purpose of the ActionResult class in MVC? a) To return data from a controller to the view b) To handle database connections c) To define UI components d) To validate form submissions
Which of the following is NOT part of an ASP.NET MVC application? a) Model b) View c) Page d) Controller
What is the typical structure of an ASP.NET MVC application? a) Views, Controllers, Models b) Pages, Views, Controllers c) Models, Pages, Services d) Views, Models, Scripts
Answer Key
Qno
Answer (Option with Text)
1
b) To build web applications
2
a) Server-side execution
3
a) .aspx
4
a) HTTP
5
b) To handle session and application events
6
d) All of the above
7
b) By copying files to the web server
8
b) To define how the page is rendered
9
b) TextBox
10
c) @Assembly
11
b) To create dynamic web pages
12
b) POST
13
a) DataGrid
14
a) WebForms uses server-side code for interaction
15
b) To output encoded data
16
d) All of the above
17
b) It stores data in the browser
18
b) ViewState is used to maintain data across requests
19
b) Page_Init
20
b) To perform partial page updates without reloading