473,320 Members | 1,802 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Master Page

How do you create a Master Page? Thanx...
Aug 13 '08 #1
4 1013
jeffstl
432 Expert 256MB
This is sort of a basic question isn't it? You can find the answer on a multitude of sites but I guess I'll go ahead and display

Expand|Select|Wrap|Line Numbers
  1.  
  2. <%@ Master %>
  3.  
  4. <html>
  5. <body>
  6.  
  7. Here is where my Master Content goes
  8.  
  9. <asp:ContentPlaceHolder id="MyMasterContent" runat="server">
  10. </asp:ContentPlaceHolder>
  11.  
  12. </body>
  13. </html>
  14.  
  15.  
Then you just name it Whatever.master

Then I guess to complete the answer in any .aspx page, you just have

Expand|Select|Wrap|Line Numbers
  1.  
  2. <%@ Page MasterPageFile="Whatever.master" language="VB" %>
  3. 'whatever other namespaces you wish to load
  4.  
  5. <asp:Content
  6. ContentPlaceHolderId="MyMasterContent" runat="server">
  7.  
Thats it :-)
Aug 13 '08 #2
DrBunchman
979 Expert 512MB
Also, you've posted your question in the ASP Forum which is for Classic ASP only - I've moved it for you but in future please post all ASP.NET questions in the .NET Forum.

Thanks,

Dr B
Aug 14 '08 #3
Frinavale
9,735 Expert Mod 8TB
All the information you need on MasterPages and any other .NET controls can be found in the MSDN Library. This resource should get you pointed in the right direction....there are multiple articles on the MasterPages there. I recommend bookmarking the MSDN Library and using it as your primary resource when developing in .NET.

Please take the time to research the problem before you post your question. The experts here are more than willing to help you with a specific problem but you have to do your part to learn the basics. Please take the time to read over the posting guidelines specifically the section on Before you post your question.

-Moderator Frinny
Aug 14 '08 #4
Thank you..I'm green with this. But I do understand. Have a great day!
Aug 14 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Michael Herman \(Parallelspace\) | last post by:
1. What are some compelling solutions for using Master/Content pages with Web Pages? 2. If a content area has a web part zone with web parts, what is the user experience like when "editting" the...
2
by: Jon Spivey | last post by:
Hi, Using VS 2005/VB.net. I need to add a meta description tag and change a stylesheet link from a page based on a master page. Found this article...
3
by: ivanpais | last post by:
Hi, I have a Web User Control, Lets say "Foo.ascx", that contains a button "btnFoo". I have a Master Page "Bar.master", that has a label "lblBar". This label is exposed by a public property...
17
by: Rob R. Ainscough | last post by:
Again another simple concept that appears NOT to be intuitive or I'm just stupid. I've read the WROX book and the example doesn't actually show how the .master page links in the other content...
2
by: SR | last post by:
I have started a web site using ASP.NET 2.0. I would like to centralize all of my classes in a StyleSheet but I cannot figure out how to link the StyleSheet to a Content Page since there is no...
0
by: Managed Code | last post by:
Hello All, Here is my issue and thanks in advance for any assistance. I have a base page with a dropdownlist that fires an event with the selected index. The content page catches the event and...
4
by: Boris Yeltsin | last post by:
OK, on my Master Page I have a control: <a id="hypTabAccount" href="#" runat="server">Account</a> Now, in the code-behind (Root.master.vb) I can refer to it simply thus: ...
7
by: Just Me | last post by:
Hi I have a master page with a control on it, but I need to set a property of that control from the content. my master page is called Admin.Master and the class is Admin. I have tried this
6
by: =?Utf-8?B?SmF5IFBvbmR5?= | last post by:
I am trying to access a Public property on a Master Page from a Base Page. On the content pages I have the MasterType Directive set up as follows: <%@ MasterType virtualpath="~/Master.master" %>...
5
by: =?Utf-8?B?bXVzb3NkZXY=?= | last post by:
Hi guys I'm trying to make my code as streamlined as possible, and add CSS file references dynamically when they are required, for example, if a page contains a webcontrol, then the related CSS...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.