-----------------------------------------------------------------------------
What are the new features in Asp.Net MVC5 ?
- Introducing One ASP.NET
- Introducing Asp.Net One Identity
- Introducing Bootstrap in the MVC template
- Introducing Filter overrides (Overriding filters)
- Introducing Authentication Filters
- Introducing Web API 2
- Introducing OAuth 2.0 Authorization in MVC 5
- OData Improvements in MVC 5(Full support for $select, $expand, $batch, and $value)
- Introducing ASP.NET SignalR 2.0
ASP.NET WEB API 2
- Attribute routing
What is One ASP.NET ?
One ASP.NET
=> Asp.Net + Site + Services + Web Forms + Web Pages + Single Page + MVC + Web API + Single R
What is the structure of ASP.NET MVC 5 and release’s ?
Bootstrap In Short:
- With the updated MVC template, You can do Customization very easily
- Better look and feel.
What is ASP.NET Web API 2 ?
- Multiple Routes (Get Routes) on an Action
- Route Defaults (With Default Parameters)
- Route Parameters as optional
- Route Constraints
- Chaining and Combining with Defaults and Optionals
- Named Routes
- Route Prefixe (New Attribute)
public class BlogController : ControllerBase
{
GET(“Blogs”)]
public ActionResult Index(int BlogId) { /* … */ }
}
What are new updates in ASP.NET MVC 5 Areas ?
- Overriding the Area URL Prefix
- Ignoring Area URLs for Certain Routes
What are advanced features of ASP.NET MVC 5 ?
- Localizing URL’s
- Newly Added provider FluentTranslationProvider
- Newly Route Convention Attribute
- Subdomain Routing
LOCALIZING URL’S
{
myConfig.AddTranslationProvider(new MyCustomTranslationProvider());
});
ROUTE CONVENTION ATTRIBUTE ATTRIBUTE
{
public override IEnumerable
GetRouteAttributes(MethodInfo actionMethod)
{
// TODO: Yield IRouteAttributes (GET/POST/PUT/DELETE/Route).
}
}
SUBDOMAIN ROUTING
public class SubdomainController : Controller
{
[GET(“”)]
public ActionResult Index() { /* … */ }
}
Much improved extensibility
Type less support (No need to define CLR types)
DATE : 2025 !!
Top 100+ .NET MVC Interview Questions for Developers
This document provides a comprehensive list of interview questions for .NET MVC developers, ranging from fundamental concepts to advanced topics. These questions are designed to test a candidate's understanding of the MVC pattern, its implementation in .NET, and best practices.
I. Core MVC Fundamentals
What is the MVC (Model-View-Controller) design pattern?
Explain the role of each component in MVC (Model, View, Controller).
What are the advantages of using MVC?
What are the disadvantages or challenges of using MVC?
How is ASP.NET MVC different from ASP.NET Web Forms?
Explain the lifecycle of an ASP.NET MVC request.
What is a
Controllerin ASP.NET MVC? How do you define one?What is an
Action Method?What are
Action Filters? Give some examples.What is a
Viewin ASP.NET MVC? What is its purpose?What is a
Modelin ASP.NET MVC?What is
Razor View Engine? What are its benefits?Explain the difference between
ViewBag,ViewData, andTempData. When would you use each?What is
Partial View? When should you use it?What is
Layout Page? How is it similar to Master Pages in Web Forms?What is
Strongly-Typed View? What are its benefits?What is
Routingin ASP.NET MVC?Explain the concept of
Route TableandRoute Handlers.How do you define a custom route?
What is
Attribute Routing? How is it configured?
II. Controllers and Action Methods
What is
ActionLinkand how does it work?How do you pass data from a Controller to a View?
What are
Action Results? List different types of Action Results.Explain
ViewResult,PartialViewResult,JsonResult,ContentResult,RedirectResult,RedirectToRouteResult.How do you handle exceptions in ASP.NET MVC?
What are
Child Actions? When would you use them?Explain
ActionNameattribute andNonActionattribute.How do you restrict an
Action Methodto specific HTTP verbs (GET, POST)?What is
Model Binding? How does it work?Explain how
Custom Model Binderscan be created.What is
RouteData?What is
Url.ActionandHtml.ActionLink? Explain their differences.How can you inject dependencies into Controllers?
Explain the purpose of
OutputCacheattribute.What is the difference between
[HttpPost]and[ValidateAntiForgeryToken]?
III. Views and Data Presentation
How do you render a Partial View within a View?
What is
Html.RenderPartial()vsHtml.Partial()?How do you render a Child Action within a View?
What is
Html.RenderAction()vsHtml.Action()?Explain the role of
@modeldirective in Razor Views.How do you use
Html Helpers? Give examples.What are
Custom Html Helpers? How do you create one?What is
Unobtrusive JavaScript? How does it relate to MVC?How do you include JavaScript and CSS files in MVC?
What is
Bundling and Minification? Why is it used?Explain the concept of
ViewStart.cshtml.What is
ViewModel? Why is it useful?How do you use
EditorForandDisplayFortemplates?What is
Scaffoldingin MVC?How can you pass data from a Partial View back to its parent Controller?
IV. Routing
What is the default routing convention in ASP.NET MVC?
Explain the order of routing registration.
How do you create a catch-all route?
What is the purpose of
RouteConfig.cs?How do you define optional URL parameters in routes?
What are
Route Constraints? Give an example.How does ASP.NET MVC determine which controller and action to execute based on a URL?
Explain
Url Generationin MVC.What is the difference between
Url.RouteUrlandUrl.Action?How do you handle routing for static files?
V. Data Access and Validation
How do you integrate Entity Framework with ASP.NET MVC?
What is
Code-First,Model-First, andDatabase-Firstapproach in Entity Framework?Explain
Data Annotationsfor validation in MVC.How do you implement
Custom Validation Attributes?What is
Client-side ValidationvsServer-side Validation? How does MVC support both?How does MVC handle
ModelState?What is
CRUDoperation in the context of MVC?How do you handle
Concurrencyissues in a web application using MVC and Entity Framework?What is
Repository Pattern? Why use it with MVC?Explain the
Unit of Workpattern.How do you perform asynchronous data retrieval in MVC?
VI. Security
What is
Cross-Site Scripting (XSS)? How can MVC help prevent it?What is
Cross-Site Request Forgery (CSRF)? How can MVC help prevent it?Explain the purpose of
[ValidateAntiForgeryToken]attribute.How do you implement
AuthenticationandAuthorizationin ASP.NET MVC?What are
Authorization Filters?How does
Forms Authenticationwork in MVC?What is
Role-Based Authorization? How is it implemented?How do you secure AJAX calls in MVC?
What are
OWINandKatana? How do they relate to MVC security?
VII. Performance and Scalability
How can you improve the performance of an ASP.NET MVC application?
Explain
Cachingin MVC.What is
Output Caching? Where can it be applied?How does
Donut Cachingwork?What is
Asynchronous ControllersandAction Methods? When should you use them?Explain
Lazy Loadingin Entity Framework.What is the impact of
N+1 Queryproblem? How to avoid it?How do you profile an ASP.NET MVC application for performance bottlenecks?
What is
MinificationandBundlingfor scripts and styles?How do you scale an ASP.NET MVC application?
VIII. Deployment and Best Practices
How do you deploy an ASP.NET MVC application?
What are
IIS (Internet Information Services)configurations relevant to MVC?Explain
Web.configtransformations for different environments.What is
Dependency Injection (DI)? Why is it important in MVC applications?Name some popular DI containers used with .NET MVC.
What is
Test Driven Development (TDD)? How do you apply it to MVC?How do you unit test Controllers and Action Methods?
What is
Mocking? Why is it used in unit testing?What are
Areasin ASP.NET MVC? When would you use them?What is
Attribute-based AuthorizationvsPolicy-based Authorization?Explain
Cross-Origin Resource Sharing (CORS)in MVC and how to handle it.What is the role of
Global.asaxin an MVC application?What is
ViewModelvsDomain Model?What is
MVC Coreand how does it differ from traditional ASP.NET MVC?
For answers go to latest blog!!
No comments:
Post a Comment