Sematec Asp .Net Mvc 5 Quiz

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Asgari.sematec
A
Asgari.sematec
Community Contributor
Quizzes Created: 8 | Total Attempts: 9,875
Questions: 10 | Attempts: 698

SettingsSettingsSettings
Sematec Asp .Net Mvc 5 Quiz - Quiz

These 10 questions will test the most important parts of the lesson, and you will get a lower score of 70, you need to study this lesson.


Questions and Answers
  • 1. 

    ASP.NET MVC Display layer is represented by:

    • A.

      Model

    • B.

      View

    • C.

      Controller

    • D.

      Partial View

    Correct Answer
    B. View
    Explanation
    The correct answer is View. In the ASP.NET MVC architecture, the Display layer is represented by the View. The View is responsible for rendering the user interface and displaying data to the user. It receives input from the user and sends it to the Controller for processing. The View is separate from the Model and Controller, ensuring a clear separation of concerns and promoting code reusability.

    Rate this question:

  • 2. 

    Assembly that defines ASP.NET MVC framework:

    • A.

      System.Web.http

    • B.

      System.Web.mvcframework

    • C.

      System.Web.mvc

    • D.

      System.Web.mvc.helpers

    Correct Answer
    C. System.Web.mvc
    Explanation
    The correct answer is System.Web.mvc because this assembly specifically defines the ASP.NET MVC framework.

    Rate this question:

  • 3. 

    In order to plug ASP.NET MVC into ASP.NET Web Form application, which assemblies we need to add [Choose three]:

    • A.

      System.Web.Routing

    • B.

      System.Web.http

    • C.

      System.Web.Abstraction

    • D.

      System.Web.Mvc

    Correct Answer(s)
    A. System.Web.Routing
    C. System.Web.Abstraction
    D. System.Web.Mvc
    Explanation
    To plug ASP.NET MVC into an ASP.NET Web Form application, we need to add three assemblies: System.Web.Routing, System.Web.Abstraction, and System.Web.Mvc. These assemblies are necessary for routing, abstraction, and MVC functionality respectively.

    Rate this question:

  • 4. 

    ViewBag is an object of type:

    • A.

      Dictionary

    • B.

      Dynamic Property

    • C.

      List

    • D.

      None of above

    Correct Answer
    B. Dynamic Property
    Explanation
    ViewBag is an object of type Dynamic Property. In ASP.NET MVC, ViewBag is a dynamic property that is used to pass data from the controller to the view. It allows developers to dynamically add properties to the ViewBag object and access them in the view. This dynamic nature of ViewBag allows for flexibility in passing data between the controller and the view without the need for strongly typed models.

    Rate this question:

  • 5. 

    In an MVC application, request received from client hits first:

    • A.

      Model

    • B.

      View

    • C.

      Controller

    • D.

      Partial View

    Correct Answer
    C. Controller
    Explanation
    In an MVC (Model-View-Controller) application, the request received from the client hits the controller first. The controller is responsible for handling the incoming request, processing any necessary data, and determining the appropriate response. It acts as an intermediary between the model (which represents the data and business logic) and the view (which displays the user interface). Once the controller has processed the request, it may interact with the model to retrieve or update data and then pass the necessary information to the view for rendering. Therefore, the controller is the first component to be triggered in the request-response cycle.

    Rate this question:

  • 6. 

    Routing in ASP.NET MVC is basically [Choose One]?

    • A.

      It rewrites one new URL to another old URL.

    • B.

      It maps a URL to a resource.

    • C.

      It maps one URL to another URL.

    Correct Answer
    B. It maps a URL to a resource.
    Explanation
    Routing in ASP.NET MVC is the process of mapping a URL to a specific resource, such as a controller action or a view. It allows for the creation of clean and user-friendly URLs that can be easily understood by both users and search engines. By mapping a URL to a resource, the routing mechanism determines which controller and action should handle the request and generates the appropriate response. This helps in achieving a clear separation of concerns and enables developers to build flexible and maintainable web applications.

    Rate this question:

  • 7. 

    Role of Model in MVC is to hold ?

    • A.

      Input and UI logic.

    • B.

      Application business logic.

    • C.

      No logic at all.

    • D.

      Holds both UI and application business logic.

    Correct Answer
    B. Application business logic.
    Explanation
    In the Model-View-Controller (MVC) architecture, the role of the Model is to hold the application business logic. This means that the Model is responsible for managing and manipulating the data and implementing the rules and operations that govern the behavior of the application. The Model is separate from the UI logic, which is handled by the View, and it does not hold any UI-related logic. Instead, the Model focuses on the core functionality and operations of the application, making it a crucial component in the MVC pattern.

    Rate this question:

  • 8. 

    Action filters are used to ?

    • A.

      Filter request to controller.

    • B.

      Filter data from controller to view.

    • C.

      Apply specific logic before or after action methods.

    • D.

      Pass data from controller to view.

    Correct Answer
    C. Apply specific logic before or after action methods.
    Explanation
    Action filters are used to apply specific logic before or after action methods. These filters allow developers to add additional functionality to an action method without modifying the method itself. They can be used to perform tasks such as authentication, authorization, logging, exception handling, and data manipulation before or after the execution of an action method. By applying action filters, developers can easily implement cross-cutting concerns and improve code reusability and maintainability.

    Rate this question:

  • 9. 

    Which of the following statements are true for ASP.NET MVC [Choose two]?

    • A.

      ASP.NET MVC uses Front Controller approach.

    • B.

      ASP.NET MVC is stateful.

    • C.

      Automated testing is simple.

    • D.

      Has limited control over HTML, JavaScript and CSS.

    Correct Answer(s)
    A. ASP.NET MVC uses Front Controller approach.
    C. Automated testing is simple.
    Explanation
    ASP.NET MVC uses the Front Controller approach, which means that it centralizes the handling of requests and routes them to the appropriate controllers. This allows for better control and organization of the application's logic.

    Automated testing is simple in ASP.NET MVC because it follows the principle of separation of concerns, which makes it easier to write unit tests for individual components of the application. This promotes testability and helps ensure the reliability of the codebase.

    Rate this question:

  • 10. 

    What are the advantages of ASP.NET MVC Partial View [Choose two]?

    • A.

      Imporves reusability.

    • B.

      Improves security.

    • C.

      Easy to maintain.

    • D.

      Support interoperability

    Correct Answer(s)
    A. Imporves reusability.
    C. Easy to maintain.
    Explanation
    ASP.NET MVC Partial View provides the advantages of reusability and easy maintenance. By using partial views, developers can create reusable components that can be used across multiple views, reducing code duplication and improving efficiency. Additionally, partial views are easier to maintain as any changes made to a partial view will automatically reflect in all the views that use it. This makes it easier to update and modify the application without impacting other parts of the code.

    Rate this question:

Back to Top Back to top
Advertisement