Reputation: 53
i have login,register and welcome web forms in my project in this forms are designed and codded now i am going create a master page for this project
how can i create a master page for this 3 forms in web application.
i know only the creation of master page first and then select web form using master page this concept i clearly know.
but i want to create a master page for this already designed web forms...
how can i do this any one help me?....
you humble replies are welcomed............ thank you....
Upvotes: 1
Views: 813
Reputation: 4779
Generally, I would just say that you should learn ASP.NET documentation a bit. As a web-developer you must know such basic things for sure!
I won't describe how you create MasterPage -- you said you already know that.
But to move your existent pages to it, you should:
add a reference to it in your page header:
<%@ Page ... MasterPageFile="~/PathToThePage/YourMasterPage.master" ... %>
then use asp:Content blocks to put your html of child page into the blocks defined in master page:
<asp:Content ID="Content1" ContentPlaceHolderID="ContentHeader" runat="Server">
some parts of child page
</asp:Content>
ContentPlaceHolderID="ContentHeader" -- this is ContentPlaceHolder you define in your master page:
<asp:ContentPlaceHolder ID="ContentHeader" runat="server">
Some part which will be replaced with child page
</asp:ContentPlaceHolder>
Upvotes: 1