ASP.NET MVC Interview Questions and Answers (162) - Page 7

What kind of helper methods does WebSecurity class provide?

NOTE: This is objective type question, Please click question title for correct answer.
In MVC Framework,who decides what to render in the VIEW?

NOTE: This is objective type question, Please click question title for correct answer.
What are the keywords which specify a Route in MVC?

NOTE: This is objective type question, Please click question title for correct answer.
Which is the default method that will be called on a controller if we do not explicitly specify in Asp.Net MVC?

NOTE: This is objective type question, Please click question title for correct answer.
What is controller in MVC?

NOTE: This is objective type question, Please click question title for correct answer.
What is MVC?

NOTE: This is objective type question, Please click question title for correct answer.
What is an advantage to using first chance exception notification?

NOTE: This is objective type question, Please click question title for correct answer.
What class handles the actual data encryption?

NOTE: This is objective type question, Please click question title for correct answer.
How is model binding in MVC different from ViewState in ASP.net Webforms?

NOTE: This is objective type question, Please click question title for correct answer.
What is html helper control?

In Classic ASP.NET, we have the web form controls like

<asp:button>, <asp:textbox>,<asp:lable>,<asp:datagrid> etc
After rending at the client side, these controls gets transform to standard HTML controls like

<input type="button">,<input type="text">,<span>,<table>
respectively.

Unlike Classic ASP.NET, Asp.net MVC does not provide any direct web form controls.However, they does so by providing the HTML Helper which are more lightweight in nature as compared to Classic ASP.NET web form controls.

Let us look at an example to get a more clarity on the picture

Suppose we need to have a Textbox control design in Classic ASP.NET. In that case we write

<asp:textbox id="myTxtBox" name="myTxtBox" runat="server" value="default text"/>


This get render at the browser to

<input type="text" id="myTxtBox" name="myTxtBox" value="default text""/>


The same can be achieve in Asp.net MVC by using the HTML Helper as shown below

@Html.TextBox("myTxtBox", "default text"")


From the above we can infer that, HTML Helper is like a method that returns a HTML string.

But unlike the Classic ASP.NET web form controls, HTML Helper does not have events associated with them and also does not have any view state.

Asp.net MVC provides built-in HTML Helper's, Templated Helpers. If the existing HTML Helper's does not meet the requirment, one can create Custom Html Helpers too.
Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Interview Questions and Answers Categories