RSS

6) Introduction to ASP.NET Master Page Feature [F]

Master Page Introduction This is where the fun begins. Master page is a very important concept because Master Page allow your website pages to have the same look and feel. When you create a Master Page, you can inherit from this page so that all other pages pages inherits from it have the same look as the master page.

preview image

To add a master page, add a new item, and select Master Page from the choices. Once the master page is added, go to the source code and you see a contentplaceholder within the master page. The function of this contentplaceholder is that when you create pages that inherits from the master page, the contentplace holder will provide a custom content for this pages. Any other area apart from the contentplaceholder you will not be able to modify it ;-) (watch video to understand).

In order to create a master page i deleted the contentplaceholder that was added by default, then i added a 3×3 table. This table will be used to create a layout for the master page. The layout was structured with header section, content section, footer section, and navigation section.

Follow what i did to create a clean layout if you are not proficient in CSS, but if you know CSS you will shine :-) . I added a new page that inherited from the master page and showed you how to add the custom content provider, which is the contentplaceholder.

I also showed you how to modify the CSS of the master page from the properties windows. This will add the CSS properties inside the header area. If you are very good in CSS you can create your styles on a separate file and add the file to the application as an existing item or simply drag and drop it inside your page.

I then add another page to demonstrate that they all have same look and feel. Watch the videos and leave comments. Thanks.

  • Share/Bookmark

6 Comments Add Yours ↓

  1. Jimmy Soderberg #
    1

    I love all your videos, they are so easy to understand, I’ve tried so many different video tutorials and none of them made any sense (I¨ve even payed for online training and still have found it to be hard to get)Thank you so much for making all these videos!

    • admin #
      2

      Thanks for the comments, I’ll continue to make more videos ;-)

  2. tyler_durden #
    3

    Really helpful vids, learning alot more this way. Thanks, keep up the good work!

  3. fred sten #
    4

    Video nr 6 doesnt work?

  4. Biodun Olalere #
    5

    Thank you so much for this wonderful tutorial. I have been struggling to learn ASP.NET but your tutorial is giving me the breakthrough. It is so easy to follow, I like the way you communicate (you are very calm), and I like the way in which one lesson leads to the other. I am actually practicing along with the tutorial and it makes it so fun for me. I can’t thank you enough. Please keep up the good work.

  5. Manvendra Diwivedi #
    6

    thiese videos are very helpful. But I want to download these videos.



Your Comment