hi, i take one master page .why taking another content page?
i see one assignment on net i tried it.when i take master page and adding content page abc.aspx i.e when adding abc.aspx i select checkbox select master page & then add .
but i want to see design view of abc.aspx my 'pc' hang.each time .
what is actual problem?
Loading
Majid KamaliPosted Mar 13, 2011, 9:12 AM
I didn't understand your question exactly, but there are two ways for binding a master page to a content page:
1. If you created a "Website", you can use this. During creating a new page, there is a checkbox that says:"Select master page". If you checked this, you should select master page that you already created.
2. This way work for both "Website" and "Webapplication".Add a Mater page to your program. Go to Source view of an existing page that you want to be your content page. Then add a MasterPageFile anchor to it. somthing like below:
Before Adding: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>
After Adding: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" MasterPageFile="~/Masterpage1.Master" Inherits="WebApplication1._Default" %>
Then select all of text except first line (line, which has "<%@ page ... %>"). Then delete them.
Now add
Now your content page is ready to use !
>>If it helped, Mark it as answer, Thanks<<