Advanced Asp.net MVC Interview Questions 2019-2020 Freshers - 1
Question: 1
What are the new improvements in Asp.Net MVC 2 API?
In the Asp.Net MVC 2 API, the following new members are included:
The Controller class includes protected virtual CreateActionInvoker method. The Controller class invokes the method by using the ActionInvoker property and allows the delay instantiation of the invoker if no invoker is already set.
The AuthorizeAttribute class includes protected virtual HandleUnauthorizedRequest method. This helps filters that are derived from AuthorizeAttribute to get control of the behavior when the authorization fails.
The add (string key, object value) method is included provides the dictionary initialize syntax for ValueProviderDictionary
The Sys.Mvc.AjaxContext class includes the get_object method. It returns the JSON object.
The UrlParameter.optional token included that is used to solve problems while binding data to a model.
Question: 2
Explain the T4 template included in the Asp.Net MVC 2 Framework?
Asp.Net MVC 2 includes a new property for Text Template Transformation Toolkit (T4) Templates that is used to specify the version of the .NET framework of the Web application. This property allows T4 templates to generate code and markup according to the version of the .NET framework. In Visual Studio 2010, the value of property can be either 3.5 or 4.0.
Question: 3
What are the changes introduced in the Asp.Net MVC 2 framework?
The changes introduced in the Asp.Net MVC 2 framework are:
Change in property validation behavior for classes that implement the IDataErrorInfo interface
IIS script-mapping script is no longer available in the MVC installer
The Html.Substitute helper method in MVC is removed
The IValueProvider interface replaces all the uses of IDictionary<string, ValueProviderResult>
The new CSS classes are added in the Site.css file
The JsonResult class in MVC responds only to the HTTP POST requests
The ModelMetadata property is added to the ModelBindingContext class in MVC 2
The Custom Controller factories require new signatures due to changes in the DefaultControllerFactory class
Area is now a reserved route value key and cannot be used with route URL
Question: 4
Which class defines the preconfigured URL routes for the Asp.Net MVC Framework?
The Asp.Net Application class defines the preconfigured URL routes for the Asp.Net MVC Framework inside the Global.asax file.
Question: 5
Explain the new features included in MVC 2 Framework?
Templated Helpers – Enables building of user interface that is based on the data model
Areas – Groups controllers and views in MVC into sections of a large Web application having isolation from other sections.
Asynchronous Controllers – Process requests asynchronously
DefaultValueAttribute – Allows the user to initialize the argument parameter of an action method with a default value
Binding Binary Data – Supports binding of binary data with Model binders
DataAnnotations Attribute – Enables you to implement validation logic to a Model by using metadata attributes
Model-Validator Providers – Provides an abstraction that implements validation logic for the Model
Client Side Validation – Provides client side validation by library included in Asp.Net MVC 2 framework. It consists of JavaScript Object Notation(JSON) serialized data.
New Code Snippets for Visual Studio 2010 – Provides information about predefined HTML code snippets in Visual Studio 2010
Overriding the HTTP Method Verb – Determines which action to perform for a resource in a website, which is developed using the Representational State Transfer (REST) architectural style
Html.ValidationSummary Method – Displays one Model-level errors instead of showing all the validation errors
T4 Templates – Generates code and markup according to the version of the .NET framework.
TNPSC Migration and Urbanisation Research Questions More
Migration and Urbanisation MCQ Questions and Answers Pdf More
Migration and Urbanisation Class 8 Questions and Answers Pdf More
People's Revolt Class 8 Questions and Answers Pdf More
Trade and Territory Class 8 Questions and Answers Pdf More
Computer Communication Multiple Choice Questions & Answers Pdf More
TNPSC General Studies Questions with Answers More
Web Technology MCQ Questions and Answers More
100+ Sequence Puzzles Questions with Answers More
100+ Line Charts Data Interpretation Questions and Answers More