delete
delete

Reputation:

How to assign a master to an existant webform?

My friend I are collaborating on a project, he's going to create the Master Page and I'll create the forms.

How can I assign a master page to my existent .aspx form?

Upvotes: 0

Views: 125

Answers (1)

Matthew Jones
Matthew Jones

Reputation: 26190

I believe the only thing you need to do is have MasterPageFile in your page declaration, like so:

<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.master" 
CodeFile="ContentPage.aspx.cs" Inherits="ContentPages_ContentPage" %>

And, of course, make sure you use the <asp:Content> tags to design your page.

<asp:Content ID="mainContent" runat=server ContentPlaceholderID=ContentPlaceholder1>

Upvotes: 2

Related Questions