Live Help (Start Chat)
View Count: 0
Duration: 41 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 18 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 12 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 31 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 21 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 12 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 21 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 22 mins
Accessed date:
Not Yet Viewed
Post your comment / feedback here
 
 

Be the first one to comment about this video

Question No: 1 of 32
Which of the following is true about MVC Controller? 
Options:
  1. They directly process incoming requests
  2. Handles user inputs and interactions
  3. Must handle business logic of an application
  4. Should take care the user interface / HTML rendered to browser
View Answer/Explanation:
a b c
Explanation:
The Responsibility of the MVC Controller is to Process the incoming requests from the user and handles user inputs and Performing Business logic of an application

Question No: 2 of 32
The custom Controller classes are inherited from_____________. 
Options:
  1. System.Web.UI.Controller
  2. System.Web.MvcController
  3. System.Web.Mvc.Controller
  4. System.Web.UIController
View Answer/Explanation:
c
Explanation:
Custom classes are inherited from System.Web.Mvc.Controller and this class is further inherited from BaseController

Question No: 3 of 32
The Controllers ActionMethod always binded to specific view which can be dynamically decided 
Options:
  1. Yes
  2. No
View Answer/Explanation:
b
Explanation:
No, it is not necessary. It can be binded to a view that if required can be dynamically decided and name of that view can be passed to View method...for eg: return View("AnotherViewName").

Question No: 4 of 32
Which of the following are valid return types of an ActionMethod in a Controller 
Options:
  1. ViewResult
  2. ActionResult
  3. void
  4. int
View Answer/Explanation:
a b d
Explanation:
ActionMethods of a Controller can returns all the types except void.

Question No: 5 of 32
The common abstract base class of ViewResult, PartialViewResult and ContentResult is _________________ 
Options:
  1. ActionResult
  2. ViewResult
  3. ActionMethod
  4. Controller
View Answer/Explanation:
a
Explanation:
Most action methods return an instance of a class that derives from ActionResult. The ActionResult class is the base for all action results. However, there are different action result types, depending on the task that the action method is performing. For example, the most common action is to call the View method. The View method returns an instance of the ViewResult class, which is derived from ActionResult.

Question No: 6 of 32
Which is not a valid return type of ActionMethod (not inherited from ActionResult) 
Options:
  1. ViewResult
  2. JsonResult
  3. XMLResult
  4. EmptyResult
View Answer/Explanation:
c
Explanation:

Question No: 7 of 32
What is the difference between “ActionResult” and “ViewResult”? 
Options:
  1. ViewResult performs an HTTP redirection to a specifed URL
  2. ViewResult serializes a given ViewData object to JSON format
  3. ActionResult is an abstract class while ViewResult derives from ActionResult class
  4. ViewResult returns a file to the client, which is provided by a Stream while an ActionResult performs an HTTP redirection to a specifed URL
View Answer/Explanation:
c
Explanation:
:-Most action methods return an instance of a class that derives from ActionResult. The ActionResult class is the base for all action results. However, there are different action result types, depending on the task that the action method is performing. For example, the most common action is to call the View method. The View method returns an instance of the View Result class, which is derived from ActionResult.

Question No: 8 of 32
If action method should not return anything to client, what should be return value of an action method 
Options:
  1. 0
  2. Empty
  3. Null
  4. 1
View Answer/Explanation:
c
Explanation:
If action method should not return anything then the return value must be null

Question No: 9 of 32
public ActionResult Index()
{
 ViewBag.Message = “Welcome to ASP.NET MVC!”;
 return View("About");
}

Is the return View statement correct? 
Options:
  1. Yes
  2. No
View Answer/Explanation:
a
Explanation:
It renders the response of About.cshtml instead of Index.cshtml.

Question No: 10 of 32
public ActionResult Index()
{
 ViewBag.Message = “Welcome to ASP.NET MVC!”;
 return View();
}
Which of the following view file is executed? 
Options:
  1. The return will result in an error
  2. /Views/Home/Index.cshtml
  3. /Views/Home/Home.cshtml
  4. /Views/Home/Default.cshtml
View Answer/Explanation:
b
Explanation:
When the view name isn’t specified, the ViewResult returned by the action method applies a convention to locate the view. It fi rst looks for a view with the same name as the action within the /Views/ControllerName directory (the controller name without the “Controller” suffi x in this case). The view selected in this case would be /Views/Home/Index.cshtml

  1