MVC Architecture in .Net

This article helps you that how MVC pattern can be used in ASP.NET application & maintain the basic Microsoft supplied architecture. MVC stands for MODEL VIEW CONTROLLER. ASP.NET MVC is an architecture to develop ASP.NET web applications in a different manner than the traditional ASP.NET web development. Web applications developed with ASP.NET MVC are even more SEO (Search Engine) friendly. The entire ASP.NET MVC architecture is based on Microsoft .NET Framework 3.5 and in addition uses LINQ to SQL Server. What is a Model? MVC model is basically a C# or VB.NET class A model is accessible by both controller … Click here to continue…..

How to call a C# Web(Page) Method from Javascript using ScriptManager

Atlas (Javascript Library) gave us the ability to easily call Web method from JavaScript. Microsoft AJAX has gone one step further! We can now call web methods in the code behind of the current page from Javascript. Here’s how: For Enable Page Methods on your ScriptManager set the EnablePageMethods=”true” attribute

For this you must mark your method as static and give it the Web-method attribute. The method has to be declared static. It must also be marked with the WebMethod attribute. You’ll probably find that you need to include System.Web.Services

For Call it from Javascript you need to call the method from javascript you … Click here to continue…..

What are Action Methods in ASP.NET MVC?

I already explained about request flow in ASP.NET MVC framework that request coming from client hits controller first. Actually MVC application determines the corresponding controller by using routing rules defined in Global.asax. And controllers have specific methods for each user actions. Each request coming to controller is for a specific Action Method. The following code example, “ShowBooks” is an example of an Action method.

Difference between ASP.NET MVC and ASP.NET WebForms?

ASP.NET Web Forms uses Page controller pattern approach for rendering layout, whereas ASP.NET MVC uses Front controller approach. In case of Page controller approach, every page has its own controller, i.e., code-behind file that processes the request. On the other hand, in ASP.NET MVC, a common controller for all pages processes the requests. ASP.NET WebForms ASP.NET MVC Uses the ‘Page Controller’ pattern. Each page has a code-behind class that acts as a controller and is responsible for rendering the layout. Uses the ‘Front Controller’ pattern. There is a single central controller for all pages to process web application requests and … Click here to continue…..

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.