ASP.NET MVC Interview Questions with Answers
ASP.NET MVC Interview Questions with Answers
The whole purpose of this article is to quickly brush up your MVC knowledge from ASP.NET MVC interview perspective.
The purpose of this article is to quickly brush up your MVC knowledge before you go for MVC interviews. This article does not teach Asp.net MVC step by step, it’s a last minute revision sheet before going for MVC interviews. Things like: What is MVC (Model View Controller)? What are the benefits of using MVC? How can we do validations in MVC?
Table of content
- Disclaimer
- What is MVC (Model view controller)?
- Explain MVC application life cycle?
- Is MVC suitable for both Windows and web applications?
- What are the benefits of using MVC?
- Is MVC different from a three layered architecture?
- What is the latest version of MVC?
- What is the difference between each version of MVC 2, 3 , 4, 5 and 6?
- What are HTML helpers in MVC?
- What is the difference between “HTML.TextBox” vs “HTML.TextBoxFor”?
- What is routing in MVC?
- Where is the route mapping code written?
- Can we map multiple URLs to the same action?
- Explain attribute based routing in MVC?
- What is the advantage of defining route structures in the code?
- How can we navigate from one view to other view using a hyperlink?
- How can we restrict MVC actions to be invoked only by GET or POST?
- How can we maintain sessions in MVC?
- What is the difference between tempdata, viewdata, and viewbag?
- What is difference between TempData and ViewData ?
- Does “TempData” preserve data in the next request also?
- What is the use of Keep and Peek in “TempData”?
- What are partial views in MVC?
- How do you create a partial view and consume it?
- How can we do validations in MVC?
- Can we display all errors in one go?
- How can we enable data annotation validation on the client side?
- What is Razor in MVC?
- Why Razor when we already have ASPX?
- So which is a better fit, Razor or ASPX?
- How can you do authentication and authorization in MVC?
- How to implement Windows authentication for MVC?
- How do you implement Forms authentication in MVC?
- How to implement AJAX in MVC
- What kind of events can be tracked in AJAX?
- What is the difference between ActionResult and ViewResult?
- What are the different types of results in MVC?
- What are ActionFilters in MVC?
- What are the different types of action filters?
- If we have multiple filters, what’s the sequence for execution?
- Can we create our own custom view engine using MVC?
- How to send result back in JSON format in MVC
- What is WebAPI?
- But WCF SOAP also does the same thing, so how does WebAPI differ?
- With WCF you can implement REST, so why WebAPI?
- How can we detect that a MVC controller is called by POST or GET?
- What is Bundling and Minification in MVC?
- How does bundling increase performance?
- How do we implement bundling in MVC?
- How can you test bundling in debug mode?
- Explain minification and how to implement it
- How do we implement minification?
- Explain Areas in MVC?
- Explain the concept of View Model in MVC?
- What kind of logic view model class will have?
- How can we use two ( multiple) models with a single view?
- Explain the need of display mode in MVC?
- Explain MVC model binders?
- Explain the concept of MVC Scaffolding?
- What does scaffolding use internally to connect to database?
- How can we do exception handling in MVC?
- How can you handle multiple Submit buttons pointing to multiple actions in a single MVC view?
- What is CSRF attack and how can we prevent the same in MVC?
Disclaimer
For Further reading do watch the below Interview preparation videos and step by step video series.
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
2020-06-18 sqlmap
2020-06-18 C# Type Comparison: Type.Equals vs operator ==
2020-06-18 What does “Use of unassigned local variable” mean?
2020-06-18 Interface Definition Language
2019-06-18 538. Convert BST to Greater Tree