Live Help (Start Chat)
View Count: 0
Duration: 39 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 9 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 35 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 10 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 13 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 15 mins
Accessed date:
Not Yet Viewed
Post your comment / feedback here
 
 

Be the first one to comment about this video

Question No: 1 of 6
which of the following is valid html output produced by
 @Html.ActionLink("Home","Index","Demo",new{Id=1,name="sandeepsoni"},new{target="_blank"}) 
Options:
  1. <a href="/Demo/Index/1name=sandeep+soni"target="_blank">Home</a>
  2. <a href="/Home/IndexId=1&name=sandeep+soni"target="_blank">Demo</a>
  3. <a href="/Demo/IndexId=1&name=sandeep+soni"target="_blank">Home</a>
  4. <a href="/Home/Index/1?name=sandeep+soni" target="_blank">Demo</a>
View Answer/Explanation:
a
Explanation:
First Parameter is Link display text Second parameter is action name third parameter is controller name because Id is part of default route it not used in query string name is extra route property hence included as query string.

Question No: 2 of 6
How to call an action Method on the click of a link? 
Options:
  1. @Html.ActionLink("LinkName", "ActionMethod", "Controller")
  2. @Html.ActionLink("LinkName", "Controller", "ActionMethod")
  3. @Html.ActionLink("LinkName", "ActionMethod")
  4. @Html.ActionLink("LinkName")
View Answer/Explanation:
a
Explanation:
When we need to call an ActionMethod on the click of a link then the syntax should be as below: @Html.ActionLink("LinkName", "ActionMethod", "Controller").

Question No: 3 of 6
In MVC, the Html helper used to create a 'form' tag is ? 
Options:
  1. @Html.Form()
  2. @Html.BeginFormTag()
  3. @Html.StartForm()
  4. @Html.BeginForm()
View Answer/Explanation:
d
Explanation:
@Html.BeginForm() is used to create a form tag in the Razor view engine to associate the form level methods in the page.

Question No: 4 of 6
Which of the following is true about Html.BeginForm() 
Options:
  1. It returns string with HTML form tag and the same is rendered to the browser
  2. It directly renders form tag to the browser
  3. Default Http method rendered is post
  4. Default Http method rendered is get
View Answer/Explanation:
b c
Explanation:
Return type of HTML.BeginForm is MVCForm and not string. It directly writes the tag to browser.

Question No: 5 of 6
Which of the following is invalid? 
Options:
  1. @{ Html.BeginForm(); } @{ Html.EndForm(); }
  2. @Html.BeginForm() @Html.EndForm()
  3. @{ Html.BeginForm(); @Html.EndForm(); }
  4. @using (Html.BeginForm()) { }
View Answer/Explanation:

Explanation:
Html.BeginForm() and Html.EndForm() should be enclosed within the block as they both do not return string.

Question No: 6 of 6
List depts = new List();
depts.Add(new Department() { DeptName = "D1", DeptId = 1 });
depts.Add(new Department() { DeptName = "D2", DeptId = 2 });
________ sl = new _________(depts, "DeptId", "DeptName", 2);
ViewData["DeptId"] = sl;
Fill in the blank so that sl can be used for binding to Html.DropDownList 
Options:
  1. IEnumerable and SelectList
  2. IEnumerable and SelectListItem
  3. SelectListItem and SelectList
  4. SelectList and SelectListItem
View Answer/Explanation:
a
Explanation:
SelectList is a collection of SelectListItem and thus below statement is valid IEnumerable sl = new SelectList().

  1