MVC MCQ For Freshers & Experienced

  • Question 1) MVC stand for:
  • Question 2) Who developed MVC?
  • Question 3) MVC comes from which year?
  • Question 4) What is the best approach to assign a session in MVC?
  • Question 5) Is ASPX View Engine faster than Razor View Engine?
  • Question 6) RedirectToAction() Method for which Status code represents?
  • Question 7) Which Namespaces are required to Data Annotation using MVC?
  • Question 8) What do you mean by ActionResult() ?
  • Question 9) What do you mean by ViewResult() ?
  • Question 10) Can we use view state in MVC ?
  • Question 11) Which of the following DRY principle in ASP.Net ?
  • Question 12) How can you comment using Razor Syntax?
  • Question 13) return View() works like in ASP.Net MVC C# as
  • Sharad Jaiswal
  • 09th Mar, 2020
  • 693 Followers

MVC MCQ
Updated ON

09th Mar, 2020

No. of Questions

22

Posted In

MCQ

Author

Sharad Jaiswal

Q1. MVC stand for:

  • Model-View-Controller.
  • Modern-View-Controller.
  • Model-View-Constant.
  • None of these
View Answer
MVC stand for Model-View-Controller.

Q2. Who developed MVC?

  • Leonhard Euler
  • Amedeo Avogadro
  • TrygveReenskaug
  • None of these
View Answer
TrygveReenskaug developed MVC.

Q3. MVC comes from which year?

  • 2003
  • 2002
  • 2004
  • 2006
View Answer
MVC comes from 2002.

Q4. What is the best approach to assign a session in MVC?

  • Session["LoginID"] =7;
  • System.Web.HttpContext..Current.Session["LoginID"] =7;
  • Current.Session["LoginID"] =7;
  • None of these
View Answer
Current.Session["LoginID"] =7; is the best approach to assign a session in MVC.

Q5. Is ASPX View Engine faster than Razor View Engine?

  • Yes
  • No
  • None of the abov
View Answer
Yes, ASPX View Engine is faster than Razor View Engine.

Q6. RedirectToAction() Method for which Status code represents?

  • 302
  • 305
  • 300
  • 301
View Answer
RedirectToAction() Method for 302 Status code represents.

Q7. Which Namespaces are required to Data Annotation using MVC?

  • System.ComponentModel.DataAnnotations
  • System.ComponentModel
  • Both 1 and 2
  • None of these
View Answer
Both 1 and 2 Namespaces are required to Data Annotation using MVC.

Q8. What do you mean by ActionResult() ?

  • It is an abstract Class
  • It is a Concrete Class
  • Both 1 and 2
  • None of the above
View Answer
It is an abstract Class.

Q9. What do you mean by ViewResult() ?

  • It is an abstract Class
  • It is a Concrete Class
  • Both 1 and 2
  • None of the above
View Answer
It is a Concrete Class.

Q10. Can we use view state in MVC ?

  • Yes
  • No
  • Both 1 and 2
  • None of these
View Answer
No, we can't use view state in MVC.

Q11. Which of the following DRY principle in ASP.Net ?

  • Don't revise yourself.
  • Don't repeat yourself
  • Both 1 and 2
  • None of these
View Answer
Don't repeat yourself is DRY principle in ASP.Net.

Q12. How can you comment using Razor Syntax?

  • *@ Comment me @*
  • @* Comment me @*
  • *@ Comment me *@
  • @* Comment me *@
View Answer
@* Comment me *@ comment using Razor Syntax.

Q13. return View() works like in ASP.Net MVC C# as

  • Response.Redirect()
  • Server.Transfer()
  • Both 1 and 2
  • None of these
View Answer
return View() works like in ASP.Net MVC C# as Server.Transfer().

Q14. Can you point your browser to a view and have it render?

  • Yes
  • No
View Answer
Yes, A view is always rendered by a controller that provides the data that the view will render.

Q15. Choose the return types of a controller action method?

  • ViewResult
  • JavaScriptResult
  • RedirectResult
  • All of the above
View Answer
All of the above are the return types of a controller action method.

Q16. Can we do validation in MVC using data annotations?

  • Yes
  • No
View Answer
Yes, we can do validation in MVC using data annotations.

Q17. Can it possible to share a view across multiple controllers?

  • Yes
  • No
View Answer
yes, it can possible to share a view across multiple controllers.

Q18. Identify the MVC view engine?

  • Razor
  • Shaft
  • Blade
  • Edge
View Answer
Razor is a MVC view engine.

Q19. Is controller responsible for providing the user interface (UI) to the user?

  • Yes
  • False
View Answer
Yes, the Controller is responsible for providing the user interface (UI) to the user.

Q20. Can view data be accessed via the ViewBag property?

  • Yes
  • No
View Answer
Yes, view data can be accessed via the ViewBag property.

Q21. Term in the MVC architecture that receives events is called

  • Transmitter
  • Modulator
  • Controller
  • Receiver
View Answer
Term in the MVC architecture that receives events is called Controller.

Q22. In the model-view-controller (MVC) architecture, the model defines the

  • Presentation layer
  • Interface layer
  • Business-logic layer
  • Data-access layer
View Answer
In the model-view-controller (MVC) architecture, the model defines the business-logic layer.

About Author :

  • Author of MVC MCQ

    Sharad Jaiswal

    Sharad Jaiswal is Sr. Web Developer from Noida area. He have rich experience in PHP, Angular Js, React, javascript and Node .If you any query or project on these programming you can drop your enquiry in comment section.

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.