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内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
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