0% found this document useful (0 votes)
49 views4 pages

507 - Cc. MVC-MCQ Test2023

Uploaded by

Payal Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views4 pages

507 - Cc. MVC-MCQ Test2023

Uploaded by

Payal Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Dollyben Desai Institute of Computer and Allied Sciences, Palsana

T.Y.B.C.A (SEM-5)
Certificate Course Examination - 2023
(VNSGU,SURAT)
OMR Based MCQ Exam
Time: 09:00 to 10:00 Total Marks: 50
Seat No.:
Fill strictly the details of Name of Examination & Subject on your answer book.
Name of Examination:
T.Y.B.C.A (Sem-5)
Name of Subject:
MVC (507)
Student’s Signature

1. Which of the following is not a feature of ASP.NET MVC?


A) Separation of Concerns B) Testability C) Built-in Authentication D) View State
2. Which of the following is not a valid HTTP method for an ASP.NET MVC action?
A) GET B) POST C) DELETE D) PUT
3. What is the purpose of routing in ASP.NET MVC?
A) To map URLs to controller actions B) To manage session state
C) To authenticate users D) To validate user input
4. Which of the following is the correct syntax for defining a route in ASP.NET MVC?
A) routes.MapRoute(name, url, defaults)
B) routes.DefineRoute(name, url, defaults)
C) routes.AddRoute(name, url, defaults)
D) routes.ConfigureRoute(name, url, defaults)
5. Which of the following is not a valid action result in ASP.NET MVC?
A) ViewResult B) ActionResult C) JsonResult D) FileResult
6. What is the purpose of the ViewBag object in ASP.NET MVC?
A) To pass data from the controller to the view
B) To pass data from the view to the controller
C) To store session data
D) To cache frequently accessed data
7. Which of the following is not a valid way to pass data from a controller to a view in ASP.NET MVC?
A) ViewBag B) ViewData C) TempData D) HttpRequest
8. What is the purpose of the @Html helper in ASP.NET MVC?
A) To create HTML elements B) To validate user input
C) To serialize data D) To manage session state
9. Which is the best approach to assign a session in MVC?
A. System.Web.HttpContext.Current.Session["LoginID"] =7;
B. Current.Session["LoginID”] =7;
C. Session["LoginID”] =7;
D. None
10. RedirectToActionPermanent() Method for which Status code represents?
A. 304 B. 302 C. 301 D. 300
11. RedirectToAction() Method for which Status code represents?
A. 304 B. 302 C. 301 D. 300
12. What is ActionResult() ?
A. It is an abstract Class B. It is a Concrete Class C. Both A and B D. None
13. What is ViewResult() ?
A. It is an abstract Class B. It is a Concrete Class C. Both A and B D. None
14. return View () works like in ASP.Net MVC C# as
A. Server.Transfer() B. Response.Redirect() C. Both A and B D. None
15. Which is the best approach to assign a session in MVC?
A) System.Web.HttpContext.Current.Session["LoginID"] =7;
B) Current.Session["LoginID"] =7;
C) Session["LoginID"] =7;
D) None
16. RedirectToActionPermanent() Method for which Status code represents?
A) 304 B) 302 C) 301 D) 300
17. RedirectToAction() Method for which Status code represents?
A) 304 B) 302 C) 301 D) 300
18. What is ActionResult() ?
A) It is an abstract Class B) It is a Concrete Class C) Both A and B D) None
19. What is ViewResult() ?
A) It is an abstract Class B) It is a Concrete Class C) Both A and B D) None
20. return View () works like in ASP.Net MVC C# as
A) Server.Transfer() B) Response.Redirect() C) Both A and B D) None
21. RedirectToAction() works like in ASP.Net MVC C# as
A) Server.Transfer() B) Response.Redirect() C) Both A and B D) None
22. In which format data can be return from XML into table?
A) DataSet B) Datatable C) A and B D) None
23. Can we use view state in MVC?
A) Yes B) No C) Both A & B D) None
24. What Request Processing technique follows ASP.Net?
A) Top-Down B) Down-Up C) Pipeline D) Water fall
25. What is DRY principle in ASP.Net?
A) Don't repeat yourself. B) Don't revise yourself. C) both a and b D) None
26. What is default authentication in Internet Information Services (IIS)?
A) Standard User B) Administrator C) Anonymous D) None
27. What is the extension of MVC view when using C#?
A) cshtml B) vbhtml C) None D) Both A & B
28. What is the extension of MVC view when using vb.net?
A) cshtml B) vbhtml C) None D) Both A & B
29. How can you comment using Razor Syntax?
A) *@ Comment me *@ B) @* Comment me *@
C) @* Comment me @* D) *@ Comment me @*
30. Which Namespace is used for Razor View Engine?
A) System.Web.Razor B) System.Web.Mvc.WebFormViewEngine
C) Both A & B D) None
31. Which Namespace is used for ASPX View Engine?
A) System.Web.Razor B) System.Web.Mvc.WebFormViewEngine
C) Both A & B D) None
32. The Razor View Engine uses to render server-side content.
A) @ B) <%= %> C) Both A & B D) None
33. The ASPX View Engine uses to render server-side content.
A) @ B) <%= %> C) Both A & B D) None
34. Which is more faster between ASPX View Engine and Razor View Engine.
A) ASPX View Engine B) Razor View Engine C) Both A & B D) None
35. Does Razor Engine supports for TDD?
A) Yes B) No
36. Does ASPX View Engine supports for TDD ?
A) Yes B) No
37. How to Print value from Controller to View in MVC ?
A) ViewBag.ECMDetail = "my message"; and in view @ViewBag.ECMDetail
B) ViewBag.ECMDetail = "my message"; and in view ViewBag.ECMDetail
B) ViewBag.ECMDetail = "my message"; and in view ViewBag.Title
D) None
38. Does MVC 6 introduced new JSON project-based structure?
A) Yes B) No
39. Does MVC 6 allow only save change, hitting the save but then refreshing the browser to reflect changes?
A) Yes B) No
40. Does vNext is now Open Sourced via the .NET Foundation and open to public contributions.
A) Yes B) No
41. Can vNext runs on both Mac and Linux today (Mono Version)?
A) Yes B) No
42. How does work Viewstart in MVC (ASP.Net)?
A) Viestart is used to layout of the application.
B) Viewstart is used like Masterpage in traditional forms (ASP.Net pages).
C) Viewstart render first in the views.
D) A, B and C.
43. Viewstart comes under which folder name?
A) Views B) Account C) Shared D) Home
44. Does Viewstart override all Views layout/template under "Views" folder in MVC?
A) Yes B) No
45. What is the name of default Viewstart Page in ASP.Net MVC?
A) _ViewStart.cshtml B) _Layout.cshtml C) _Login.cshtml D) None
46. Which is the way to render Partial View using ASP.Net MVC Razor Engine?
A) @Html.Partial("_PartialHeader") B) @Html.PartialView("_PartialHeader")
C) @Html.PartialHtml("_PartialHeader") D) B and C
47. Which Namespace is used to "Display" in Data Annotation using MVC ?
A) System.ComponentModel
B) System.ComponentModel.DataAnnotations
C) Both A and B
D) None
48. Which Namespaces are required to Data Annotation using MVC ?
A) System.ComponentModel
B) System.ComponentModel.DataAnnotations
C) Both A and B
D) None
49. Are both TempData/ViewData require typecasting in MVC?
A) Both (TempData/ViewData) requires type casting to avoid null exception.
B) No, these (TempData/ViewData) does not require type casting.
C) Both A) & B)
D) None
50. Is ViewBag slower than ViewData in MVC?
A) Yes B) No

You might also like