473,804 Members | 3,526 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Masterpage Body onload ? Setting from contentpage?

Hello.

How can a set the Body onload from a content page since Body is on the
masterpage?

on my master page:

<body runat="server" id="Body" >

How can I reference Body. on the content page's codebehind?

Thanks for any help or information.

Oct 13 '07 #1
3 3348
"jobs" <jo**@webdos.co mwrote in message
news:11******** **************@ z24g2000prh.goo glegroups.com.. .
How can a set the Body onload from a content page since Body is on the
masterpage?

on my master page:

<body runat="server" id="Body" >

How can I reference Body. on the content page's codebehind?
((HtmlGenericCo ntrol)Master.Fi ndControl("Body ")).Attribu tes["onload"] =
<whatever>;
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 13 '07 #2
jobs wrote:
Hello.

How can a set the Body onload from a content page since Body is on the
masterpage?

on my master page:

<body runat="server" id="Body" >

How can I reference Body. on the content page's codebehind?

Thanks for any help or information.
((ClassOfYourMa sterPage)Master ).Body

--
Göran Andersson
_____
http://www.guffa.com
Oct 13 '07 #3
works great. Thanks.

Oct 13 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1106
by: Tony | last post by:
Hi, I'm trying to access properties from a masterpage. With no success. Can somebody help me please? I used the example at: http://msdn.microsoft.com/library/en-us/dnvs05/html/masterpages.asp?frame=false#masterpages_topic11 (Exposing Properties and Methods from a Master Page) here my code:
1
2791
by: Daves | last post by:
I am using 2.0 masterpages. All content pages use some common variables, for example the DB connection string. Also some pages return links which are located in a "sublink" area in the masterpage. So the masterpage code would 1) create the public string DBConn and 2) check the public string SubLinks if it contains any links after the content page was run (if not, hide the sublink bar). Using Page_OnLoad event the masterpage code is run...
9
4360
by: Leffe Andersson | last post by:
Hi folks! I have a MasterPage with some public methods, and I would like to call them from a (app_code) class. Is it possible to set a directive or an assembly reference to a MasterPage from a normal class? I have no problem to call the masterpage's methods from a contentpage, but what I would like to do is someting like this... public partial class MyMaster : System.Web.UI.MasterPage
9
1915
by: User | last post by:
OK, I asked in a reply, but I've wasted far too long so I'm going to put a new post out there in hopes that it will be more visible. I have a MasterPage. I want to call a method declared in that class from a Page that uses the MasterPage. How do I do that? public partial class List : System.Web.UI.MasterPage { protected ArrayList m_SortList;
7
13047
by: Bon | last post by:
Dear all I create a master page with image buttons on the left-hand side for navigation. When a user clicks the student button, the content (i.e. ContentPlaceholder) in masterpage will be changed from default.aspx to students.aspx. I tried to create a subroutine in MasterPage.master.vb to do it. The code is as following. But, the default.aspx's content is shown in MasterPage even I clicked the student button.
1
1173
by: =?Utf-8?B?Q2hhZCBU?= | last post by:
I am very new to asp.net (I know asp better) and have hit a road block. I have a master page that links to a content page. The purpose of the content page is to edit the database record. I have decided to not use gridview or details view because I need to do some manipulation of the data and control the look alittle more. I have a few textboxes on the contentpage and an update button. When the page loads the textboxes are loaded with...
1
1846
by: =?Utf-8?B?Sm9obg==?= | last post by:
I have a dropdownlist in masterpage and a big table in contentpage. When ddl selection changes, I want to move a specific row of the table to the top of the contentpage. Can I do something like <a href="#mid"in ddl event handler? Maybe a Javascript? Please advise. Thanks.
4
2209
by: =?Utf-8?B?SmFwZQ==?= | last post by:
Can I refer to the controls on default.aspx from the masterpage? I have a form on the masterpage which sends information that is in a gridview in the default.aspx page.
2
1851
by: Sully | last post by:
I know this is a basic question, but I cannot find the answer. I have a 3 LinkButtons on the masterpage that set a session variable, this session variable does not get relayed to the content page until there are 2 postbacks. MasterPage: protected void lbtn01_Click(object sender, EventArgs e) { Session = "01";
0
9708
marktang
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9588
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10589
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
jinu1996
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10327
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7625
isladogs
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6857
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3828
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.