Sunday, 22 January 2017

How to know which ASP.Net MVC version is using your application

In this article, I am going to teach you how to know which mvc version is using your application.

Using C-Sharp Code

Write below method to check version of mvc application.

namespace MvcApplication1.Controllers
    public class HomeController : Controller
        public void Index()
            string MVCVersion=  typeof(Controller).Assembly.GetName().ToString();         

While at run time you can check string value as shown below. I am using MVC 4 version.


Check ASP.Net MVC Version In References Folder

Now, you can check within reference folder. Go to References folder, right click on System.Web.Mvc and select Properties. You can check version in properties window as shown below.

System.Web.Mvc in references folder


Post a Comment

Email Subscription

Subscribe to our newsletter to get the latest articles directly into your inbox

Blog Archive