In this article, I am going to teach you how to know which asp.net mvc version is using your Application.
Using C-Sharp Code
Write below method to check version of asp.net 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.