Here we will discuss about MVC Version
This is one of the important interview question.
Which version of MVC are you using in your application/project?
Now let us explore how to know that version.
We can find in 2 ways
1. At design time -
Go to Solution explorer, make expand "References" folder.
Look for the System.Web.Mvc assembly and right click on it, choose "Properties" there you can find the MVC Version.
2. At the code behind.
Use this below code in 'Page_Load" event or in any button click event
Response.WriteLine(typeof(Controller).Assembly.GetName().Version.ToString());
This is one of the important interview question.
Which version of MVC are you using in your application/project?
Now let us explore how to know that version.
We can find in 2 ways
1. At design time -
Go to Solution explorer, make expand "References" folder.
Look for the System.Web.Mvc assembly and right click on it, choose "Properties" there you can find the MVC Version.
2. At the code behind.
Use this below code in 'Page_Load" event or in any button click event
Response.WriteLine(typeof(Controller).Assembly.GetName().Version.ToString());
No comments:
Post a Comment