What is ASP.NET MVC?

ASP.NET MVC is a web development framework from Microsoft that is based on MVC (Model-View-Controller) architectural design pattern. Microsoft has streamlined the development of MVC based applications using ASP.NET MVC framework. MVC (Model-View-Controller) is an architectural software pattern that basically decouples various components of a web application. By using MVC pattern, we can develop applications that are more flexible to changes without affecting the other components of our application. “Model” is basically domain data. “View” is user interface to render domain data. “Controller” translates user actions into appropriate operations performed on model.

What is Client-Side Programming

At the same time that server-side web development was moving through an alphabet soup of technologies, a new type of programming was gaining popularity. Developers began to experiment with the different ways they could enhance web pages by embedding miniature applets built with JavaScript, ActiveX, Java, and Flash into web pages. These client-side technologies don’t involve any server processing. Instead, the complete application is downloaded to the client browser, which executes it locally. The greatest problem with client-side technologies is that they aren’t supported equally by all browsers and operating systems. One of the reasons that web development is so … Click here to continue…..

What is Server-Side Programming

To understand why ASP.NET was created, it helps to understand the problems of early web development technologies. With the original CGI standard, for example, the web server must launch a completely separate instance of the application for each web request. If the website is popular, the web server struggles under the weight of hundreds of separate copies of the application, eventually becoming a victim of its own success. Furthermore, technologies such as CGI provide a bare-bones programming environment. If you want higher-level features, like the ability to authenticate users, store personalized information, or display records you’ve retrieved from a database, … Click here to continue…..

ASP.Net MVC Project Structure

When you create an ASP.NET MVC Web application project, MVC components are separated based on the project folders shown in the following illustration: By default, MVC projects include the following folders: App_Data, which is the physical store for data. This folder has the same role as it does in ASP.NET Web sites that use Web Forms pages. Content, which is the recommended location to add content files such as cascading style sheet files, images, and so on. In general, the Content folder is for static files. Controllers, which is the recommended location for controllers. The MVC framework requires the names … Click here to continue…..

What is the difference between CONST and READONLY?

Both are meant for constant values. A const field can only be initialized at the declaration of the field. A readonly field can be initialized either at the declaration or in a constructor. Therefore, readonly fields can have different values depending on the constructor used.

Also, while a const field is a compile-time constant, the readonly field can be used for runtime constants, as in the following example:

(this can’t be possible with const)