![]() It is one of the core principles of Object Oriented Programming after encapsulation and inheritance. Polymorphism provides the ability for a class to have multiple implementations with the same name. "Poly" means many, and "morph" means forms. In other words, one object has many forms or has one name with multiple functionalities. Polymorphism is a Greek word meaning "one name many forms". In simple words, we can define Polymorphism as the ability of a message to be displayed in more than one form. The word Polymorphism means having many forms. B) Attribute-based routing: To define this type of routing, we specify the Route attribute in the controller's action method.įor More details, Click Here (For Reference 1) and Click Here (For Reference 2).A) Convention-based routing: To define this type of routing, we call MapRoute the method and set its unique name, url pattern and specify some default values.There are two types of routing (after the introduction of ASP.NET MVC 5). In this case, the URL is not mapped to specific files or folders, as was the case of earlier days' websites. ![]() Routing is a mechanism to process the incoming url that is more descriptive and gives the desired response. What is routing & different types of routing in MVC? Tempdata is also required to typecast and for null checking before reading data from it.įor More Details, Click Here Q 3. Usually, the TempData object will be stored in a session object. ![]() TempData is a dictionary object to pass the data from one action to another action in the same Controller or different Controllers. ViewData is a dictionary object to pass the data from Controller to View, where data is passed in the form of key-value pair. ViewBag is a dynamic object to pass the data from Controller to View. What is the difference between ViewBag, ViewData, and TempData in MVC? What are the different return types in MVC?įor More Details, Click Here Q 2. ![]() Frequently Asked Full Stack Developer Interview Questions And Answers Q 1. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |