Hello guys ! welcome to the Asp.net tutorials on the TheNerdMag. Today, we are going to learn how to apply master page on the all aspx forms. Well it’s quite easy. I will will show you how to do it in few simple steps.  First of all add a master page into your project.

1After adding it. You have to edit the code and add the code which i will give you. Delete everything present in the body of the master page. Make is like this.
1Now paste this code in it.

<form id=”form1″ runat=”server”>

<table style=”font-family:Arial”>
<td colspan=”2″ style=”width:800px; height:80px; background-color:#3399FF;
WebSite Header
<td style=”height:500px; background-color:#66FFFF; width:150px”>
<td style=”height:500px; background-color:#9999FF; width:650px”>
<asp:ContentPlaceHolder ID=”ContentPlaceHolder1″ runat=”server”>

<td colspan=”2″ style=”background-color:#3399FF; text-align:center”>
<b>Website Footer</b>

Now your master page is ready. Now we have to apply this master page to login page and registration page. For that you have to you have to delete the HTML ,HEAD and BODY tags from the login design code. And have to add some line that are shown in the picture. 2Same you have to do with the registration page. But here in the ID section you have to name is Content 2.
3Now you master page is applied to all both forms. It will look like this.
4Whereas the registration form will look like this.


Article Written by Waleed Rashid. More info here.