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”>
<tr>
<td colspan=”2″ style=”width:800px; height:80px; background-color:#3399FF;
text-align:center”>
<h1>
WebSite Header
</h1>
</td>
</tr>
<tr>
<td style=”height:500px; background-color:#66FFFF; width:150px”>
<h3>Menu</h3>
</td>
<td style=”height:500px; background-color:#9999FF; width:650px”>
<h3>content</h3>
<div>
<asp:ContentPlaceHolder ID=”ContentPlaceHolder1″ runat=”server”>

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

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.
5

 

 

 

SHARE
Previous articleApple TV 4 Specs Revealed Ahead Of September 9 Event
Next articleOPPO to Launch OPPO R7 Soon in Pakistan
Uzair Ahmad Ch is Founder and Editor in Chief of TheNerdMag. Uzair loves technology, internet and gadgets from childhood. That's why he is so into tech talks, internet news and updates. This interest encouraged him to start a blog about Technology. Currently he is doing Bachelors in Computer Science and leads Team TheNerdMag. TheNerdMag was founded by him in 2012. You can reach him via his social profiles or email him at uzairfreak [at] thenerdmag.com