Hi,
I now need to add MasterPages to a number of existing forms, but when I add
the code for MasterPage, the MasterPage does NOT appear when it runs.
Any thoughts?
TIA, Randy Smith 8 2084
On Apr 13, 2:31 pm, "Randy Smith" <rsm...@cta.org wrote:
Hi,
I now need to add MasterPages to a number of existing forms, but when I add
the code for MasterPage, the MasterPage does NOT appear when it runs.
Any thoughts?
TIA, Randy Smith
Make sure your Page directive includes MasterPageFile= <your master
page here>. For example, from one of my projects:
<%@ Page Language="C#" MasterPageFile= "~/rc.master"
AutoEventWireup ="true" CodeFile="Modif ier_Customer.as px.cs"
Inherits="Modif ier_Customer" Title="Customer Modifier" %>
"Randy Smith" <rs****@cta.org wrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
I now need to add MasterPages to a number of existing forms, but when I
add the code for MasterPage, the MasterPage does NOT appear when it runs.
Any thoughts?
Well, firstly, what do you mean by "existing forms"...? When you say "form",
do you mean ASPX page...?
How do you "add the code for MasterPage"...?
Sorry, but what you saying is not very understandable. I can understand each
word separately but not the whole sentce :)
Anyway in order to use master page you need to have reference to it on your
main page
<%@ Page Language="C#" MasterPageFile= "~/MasterPage.mast er"%>
Master page shoudl have something like
<asp:contentpla ceholder id="ContentPlac eHolder1" runat="server">
</asp:contentplac eholder>
somewere. It's where content will go
And the page should have
<asp:Content ID="Content1" ContentPlaceHol derID="ContentP laceHolder1"
Runat="Server">
CONTENT
</asp:Content>
The best thing for you to do is to create one dummy page with master page
using wizard and look how it's done
George
"Randy Smith" <rs****@cta.org wrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
Hi,
I now need to add MasterPages to a number of existing forms, but when I
add the code for MasterPage, the MasterPage does NOT appear when it runs.
Any thoughts?
TIA, Randy Smith
Hi,
I have an existing web site, but now need to add MasterPages. So, I've
taken existing aspx.pages and added this code:
MasterPageFile= "MasterPage.mas ter"
I've made sure that my html form elements are wrapped in:
<asp:Content ID="Content1" ContentPlaceHol derID="ContentP laceHolder1"
Runat="Server">
AND ............... ...... </asp:Content>
IN SPITE OF THIS, my MasterPage elements do NOT appear.
TIA, Randy Smith
"Mark Rae" <ma**@markNOSPA Mrae.netwrote in message
news:ub******** *****@TK2MSFTNG P05.phx.gbl...
"Randy Smith" <rs****@cta.org wrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
>I now need to add MasterPages to a number of existing forms, but when I add the code for MasterPage, the MasterPage does NOT appear when it runs.
Any thoughts?
Well, firstly, what do you mean by "existing forms"...? When you say
"form", do you mean ASPX page...?
How do you "add the code for MasterPage"...?
"Randy Smith" <rs****@cta.org wrote in message
news:eA******** ******@TK2MSFTN GP03.phx.gbl...
I have an existing web site, but now need to add MasterPages. So, I've
taken existing aspx.pages and added this code:
MasterPageFile= "MasterPage.mas ter"
So your MasterPage is in the same folder as all your content pages...?
I've made sure that my html form elements are wrapped in:
<asp:Content ID="Content1" ContentPlaceHol derID="ContentP laceHolder1"
Runat="Server">
AND ............... ...... </asp:Content>
By "wrapped in", I take it that you have removed all of the other <html>
tags like <header>, <bodyetc from your content pages...?
Well, I did have the MasterPages in the same folder, then I tried placing
the MasterPage in my main website folder, but that didn't seem to make any
difference either. Here's what my solution folders look like:
/GWO (.NET 2005 solution)
/Web
- Login aspx.form (redirects to appropriate folder based on
user role)
/OffSvcs
- aspx forms
- MasterPage (for Office Services employees)
/User
- aspx forms
- MasterPage (for general users)
/AcctUser
- aspx forms
- MasterPage (for accounting users)
/GWO (class libraries and datamappers)
TIA, Randy
"Mark Rae" <ma**@markNOSPA Mrae.netwrote in message
news:e0******** *****@TK2MSFTNG P04.phx.gbl...
"Randy Smith" <rs****@cta.org wrote in message
news:eA******** ******@TK2MSFTN GP03.phx.gbl...
>I have an existing web site, but now need to add MasterPages. So, I've taken existing aspx.pages and added this code: MasterPageFile ="MasterPage.ma ster"
So your MasterPage is in the same folder as all your content pages...?
>I've made sure that my html form elements are wrapped in:
<asp:Content ID="Content1" ContentPlaceHol derID="ContentP laceHolder1" Runat="Server" >
AND ............... ...... </asp:Content>
By "wrapped in", I take it that you have removed all of the other <html>
tags like <header>, <bodyetc from your content pages...?
Well,
I think it's been solved for those interested. Apparently, the following
code must "live" by itself. I had objects placed within it, but it just
didn't work. So, the contentplacehol der statements are below the objects.
<asp:contentpla ceholder id="ContentPlac eHolder1" runat="server">
</asp:contentplac eholder>
"Randy Smith" <rs****@cta.org wrote in message
news:Ov******** ******@TK2MSFTN GP06.phx.gbl...
Well, I did have the MasterPages in the same folder, then I tried placing
the MasterPage in my main website folder, but that didn't seem to make any
difference either. Here's what my solution folders look like:
/GWO (.NET 2005 solution)
/Web
- Login aspx.form (redirects to appropriate folder based on
user role)
/OffSvcs
- aspx forms
- MasterPage (for Office Services employees)
/User
- aspx forms
- MasterPage (for general users)
/AcctUser
- aspx forms
- MasterPage (for accounting users)
/GWO (class libraries and datamappers)
TIA, Randy
"Mark Rae" <ma**@markNOSPA Mrae.netwrote in message
news:e0******** *****@TK2MSFTNG P04.phx.gbl...
>"Randy Smith" <rs****@cta.org wrote in message news:eA******* *******@TK2MSFT NGP03.phx.gbl.. .
>>I have an existing web site, but now need to add MasterPages. So, I've taken existing aspx.pages and added this code: MasterPageFil e="MasterPage.m aster"
So your MasterPage is in the same folder as all your content pages...?
>>I've made sure that my html form elements are wrapped in:
<asp:Conten t ID="Content1" ContentPlaceHol derID="ContentP laceHolder1" Runat="Server ">
AND ............... ...... </asp:Content>
By "wrapped in", I take it that you have removed all of the other <html> tags like <header>, <bodyetc from your content pages...?
"Randy Smith" <rs****@cta.org wrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
I think it's been solved for those interested. Apparently, the following
code must "live" by itself. I had objects placed within it, but it just
didn't work. So, the contentplacehol der statements are below the objects.
<asp:contentpla ceholder id="ContentPlac eHolder1" runat="server">
</asp:contentplac eholder>
That's what I said. Content pages do not have all of the "top and tail" of
regular pages - their MasterPage provides those... This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: suzy |
last post by:
Hello,
I have created a template for my website using the masterpages template
technique.
It's working fine, except when I try to print the value of a querystring
parameter in my HTML code, I get the following error:
"The Controls collection cannot be modified because the control contains
code
blocks (i.e. <% ... %>)."
|
by: VR |
last post by:
Hi, I read about Master Pages in ASP.Net 2.0 and after implementing some
WinForms Visual Inheritance I tryed it with WebForms (let's say .aspx pages,
my MasterPage does not have a form tag itself so, cannot be called a WebForm
itself, the child pages will implement forms).
I created a Master.aspx page and removed all HTML from it, added some...
|
by: iturner100 |
last post by:
Hi,
I've been struggling with this one for a couple of hours without much
joy.
Basically, I've got a set of nested masterpages (3 as it happens). I'm
dynamically generating a new page in code and want to be able to
populate the ContentPlaceholders of the inner-most masterpage at
run-time.
|
by: Learner |
last post by:
Hello,
I have one MasterPage (it has Header and Side lay out on it) and it
has 3 component placeholders. Out of which the side one for the links
to navigate through the site, the Header place is for to display the
loginstatus and couple of links and and finally the content pages
display in the content area of the MasterPage.
Now, I have...
|
by: Nick Wouters |
last post by:
Dear All
In Classic ASP I used CSS for ALL layout.
Now in ASP.NET version 2 I am testing out Masterpages as they come in very
handy.
It seems like it is replacing CSS for layout but what is the best choise?
1) Using Masterpages with Themes (css / images / skins included in this
theme)
| |
by: LvBohemian |
last post by:
I am playing around with creating some menus
dynamically, and they
create fine and show up ok when I want them to; but
when I select a
menu NavigateUrl at run time, the applicable url shows
up as
anticipated in the content place holder but the menu
disappears...
the menu is part of the master page and is not in the
|
by: RBM007 |
last post by:
Hello,
I have created some pages in the (old) Atlas pages and migrated to AJAX
version. After the update I noticed that any page containing ASP.NET
AJAX won't compile anymore. Even if the same tags and properties are
used in a page without a masterpage.
Does anyone shares this exprerience with me or does anyone knows an
answer?
For the...
|
by: HockeyFan |
last post by:
I've done this many times with average pages, but in a case I have
now, I have a master page with some controls on it. Under certain
conditions when the user selects certain options, I want to execute a
javascript function on the masterpage. Since I make this
determination in the codebehind, I was hoping that I could call
ClientScript to...
|
by: Mort Strom |
last post by:
Right now the header of my master page contains all of the CSS styles for
all of the pages that might be loaded in my ContentPlaceHolder. The problem
is that my <styletag is getting too large to manage. I have 300 lines of
styles in my masterpage and I don't need all of this for every page --
somehow this can't be a smart way of managing...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| | |