1.
What was the name of the first version of ASP.Net MVC released?
Correct Answer
D. ASP.NET MVC CTP
Explanation
The correct answer is ASP.NET MVC CTP. CTP stands for Community Technology Preview, which refers to a pre-release version of software that is made available to the community for testing and feedback. In this case, ASP.NET MVC CTP was the first version of ASP.NET MVC released, indicating that it was a pre-release version that was being tested and refined before the official release.
2.
What do you call the framework for code generation used for ASP.Net web applications?
Correct Answer
D. Scaffolding
Explanation
Scaffolding is the framework for code generation used for ASP.Net web applications. It provides a way to quickly generate code for common tasks in web development, such as creating CRUD (Create, Read, Update, Delete) operations for database entities. Scaffolding automates the process of generating code templates and files, saving time and effort for developers. It is a useful tool for rapidly building web applications and reducing the amount of repetitive coding required.
3.
Among MVC-based applications, what does the file templates that an application uses to generate HTML responses?
Correct Answer
B. Views
Explanation
The correct answer is Views. In MVC-based applications, the Views are responsible for generating the HTML responses. They are responsible for presenting the data from the Models to the user interface. Views handle the visual representation of the data and interact with the user. They are separate from the Models and Controllers, which handle the data manipulation and business logic respectively. Therefore, the File Templates that an application uses to generate HTML responses are associated with the Views.
4.
When was ASP.Net MVC 5 first released?
Correct Answer
C. 17 October 2013
Explanation
ASP.Net MVC 5 was first released in October 2013. It included various enhancements and features designed to improve the development of web applications, such as attribute routing, authentication filters, and more sophisticated scaffolding features, among others.
5.
What do you call the ASP.NET MVC 5 feature that allows users to specify routes by annotating their controllers and actions?
Correct Answer
A. Attribute routing
Explanation
Attribute routing is the correct answer because it refers to the ASP.NET MVC 5 feature that allows users to specify routes by annotating their controllers and actions. This feature allows developers to define custom routes for their application, giving them more control over the URL structure and routing behavior. By using attributes such as [Route] and [HttpGet], developers can define specific routes for their controllers and actions, making it easier to create clean and SEO-friendly URLs.
6.
Among MVC-based applications, what are the classes that represent the application’s data that uses validation logic to enforce business rules for the specified data?
Correct Answer
A. Models
Explanation
In MVC-based applications, the classes that represent the application's data and use validation logic to enforce business rules for the specified data are called Models. Models contain the data and the logic required to manipulate and validate that data. They are responsible for retrieving and storing data from and to the database, as well as performing any necessary validation and business logic operations on the data. Models act as the intermediary between the Views and the Controllers, ensuring that the data is properly validated and processed according to the business rules before being displayed or manipulated.
7.
What ASP.Net MVC method uses a view template in creating browser HTML responses?
Correct Answer
C. Index
Explanation
The Index method in ASP.Net MVC uses a view template to create browser HTML responses. This method is commonly used to display the default view for a particular page or to list items in a collection. By returning the Index view, the controller can pass any necessary data to the view template, which will then generate the appropriate HTML response for the browser.
8.
Which of the following can be used to show all the field error messages?
Correct Answer
D. ValidationSummary
Explanation
ValidationSummary can be used to show all the fields error messages. ValidationSummary is a helper method in ASP.NET MVC that displays a summary of validation errors for each field in a form. It collects all the error messages from the ModelState and displays them in a consolidated format. This is useful when you want to show all the errors at once to the user instead of displaying them next to each individual field.
9.
What can you use to transfer temporary data to the view from the controller?
Correct Answer
D. ViewBag
Explanation
The ViewBag can be used to transfer temporary data from the controller to the view. It is a dynamic property that allows you to store and retrieve data. The data stored in ViewBag can be accessed in the view to display dynamic content based on the controller's logic. This is useful when you want to pass data that is specific to a particular request or action, without the need to create a separate model or strongly-typed view.
10.
Which of the following is used to control the selection of an action method in connection with an HTTP request method?
Correct Answer
B. ActionVerbs
Explanation
ActionVerbs is used to control the selection of an action method in connection with an HTTP request method. ActionVerbs is an attribute that can be applied to an action method in ASP.NET MVC. It allows developers to specify which HTTP request methods the action method should respond to. By using ActionVerbs, developers can restrict the access to specific action methods based on the HTTP request method used by the client.