Posts

Showing posts from August, 2020

ActionResult Return Type in MVC

                                ActionResult Return Type                   When we create an Action method in the controller so ActionResult  is the return type of                    method                        public class LearnController: Controller                     {                        // GET: Learn                         public ActionResult Index()                         {                             ViewBag.Title = "Learn Controller"; ...

Controller in MVC

Image
                                                         Controller in MVC           1)  The controller handles user requests. so when a user hit any URL from browser controller                      handle user requests.                               2)   Controller is a class and this controller class derived from the base class               3)    In the controller class, it contains a method which is an action method. so every public                      The action method in the controller class is accessible from a browser.            ...