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.
<form id=”form1″ runat=”server”>
<td colspan=”2″ style=”width:800px; height:80px; background-color:#3399FF;
<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”>
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.Same you have to do with the registration page. But here in the ID section you have to name is Content 2.
Now you master page is applied to all both forms. It will look like this.
Whereas the registration form will look like this.
Article Written by Waleed Rashid. More info here.