Click here to Skip to main content
15,901,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created a master page seperate and a Career page seperately...career page is not linked up with master page...
i have done al the designing and codings of that carrer page..and now i want that my this carrer page should b linked with master page...so that that contents of master page as header and footer can be automatically displayed on carrers page...
so how cn i do this...please help me out
Posted
Comments
Tom Marvolo Riddle 6-Mar-14 0:47am    
Include this: MasterPageFile ="~/Admin/MasterPage.master" /////Masterpage path

in this
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
manishmns12 6-Mar-14 0:51am    
this is my career page directry...
what shld i do n where..


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Career.aspx.cs" Inherits="Career" %>
Tom Marvolo Riddle 6-Mar-14 0:58am    
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Career.aspx.cs" Inherits="Career" MasterPageFile ="~/Admin/MasterPage.master" //set your master page path here %>

Quote:
this is my career page directry...
what shld i do n where..
ASP.NET
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Career.aspx.cs" Inherits="Career" %>
Here...
ASP.NET
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/SomeMasterPage.Master" CodeFile="Career.aspx.cs" Inherits="Career" %>

Refer - How to assign a master page to a existing .aspx page?[^].
Quote:
Add this to your existing aspx Page declaration:
HTML
MasterPageFile="~/SomeMasterPage.Master"

Should also mention that to add page specific content to your Page you also need to add any Content tags (defined in your Master Page) to your aspx page also:
ASP.NET
<asp:content id="myContent" contentplaceholderid="someContent" runat="server" xmlns:asp="#unknown">

  // Page Content goes here

</asp:content>

If you don't put these in then the default content from your Master Page is used instead.
 
Share this answer
 
Hai
The above solution 1 work fine,or u can do like this

just exclude that Career page(right click Career and click exclude from project) and then add new form and change name Career and choose master page and click ok . Like adding new page with master page.
Then open career.aspx(excluded page) copy source code inside <form> tag and paste in new Career.aspx page inside ContentPlaceHolder1 tag and again go to carrer(excluded) coding page copy all and paste in new career coding page.


Regards
Aravind
 
Share this answer
 
v3
Comments
manishmns12 6-Mar-14 2:07am    
sir i will do that but the .cs page codings of the earliar page(which i excluded) will get to the new page..?????
i have used grid view sql data source...will all the contents and codings will be copied to the new page???
Aravindba 6-Mar-14 2:10am    
yes,u can copy all codings(.cs) page from excluded to new .cs page,in new page also same name Career ?

if u right click Career.aspx and exclude automatically it coding page also (.cs file) excluded.so u get new .cs page when add new form,just copy from old(exclude) page and paste in new .cs page

i think new form also same name Career.aspx ? if not just skip main class form old page,just copy namespace and other fuctions,for main class copy inside codings only,bcz main class must have Career same as aspx page name

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900