Part 146 Why use master pages in asp net

  • دعنا نشارك هذا :
ترتيب الدرس : 146
المدة : 00:05:34
التحكم :
Text version of the video

Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.


All ASP .NET Text Articles

All ASP .NET Slides

ASP.NET Playlist

All Dot Net and SQL Server Tutorials in English

All Dot Net and SQL Server Tutorials in Arabic

It is common for a web site to have a consistent look and behaviuor across all the pages in the web application.

To have a common layout across all our pages, without the use of master pages. There are 2 options
Option 1: Copy and paste the required HTML across all pages in the application

The following are the problems with this approach
1. We have lot of duplicated HTML on every page
2. If we have to change something in the common layout, we will have to make the change in all the pages, which is time consuming and error prone.

Option 2: Implement the layout using the following user controls.
1. Header user control
2. Menu user control
3. Footer user control

The following are the problems with using user controls
1. We will end up with complicated HTML and CSS if we have to design the layout similar to the one in the above image
2. All the user controls have to be manually added on each and every page of the site

So, the best approach to have a consistent look and feel across all pages in a web application is to use master pages. We will discuss master pages in our next video.

سيتم تفعيل التعليقات قريبا

Sep 23, 2020 07:32:26