473,511 Members | 10,195 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

access to masterpage methods

Hey folks.
I'd like to know if it's possible to define a method in masterpage
codebehind and then call it from the page, who uses the masterpage via
Master.something maybe.
Thanks.

Dec 7 '06 #1
1 3538
Yes, if you declare
<%@ MasterType virtualpath="~/MyMaster.master" %>

you will be able to access any public members of the master page:

this.Master.MyPublicMember
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"cruster" <cr*****@gmail.comwrote in message
news:11**********************@n67g2000cwd.googlegr oups.com...
Hey folks.
I'd like to know if it's possible to define a method in masterpage
codebehind and then call it from the page, who uses the masterpage via
Master.something maybe.
Thanks.

Dec 7 '06 #2

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

Similar topics

0
1090
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:...
9
4337
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...
2
7664
by: dawg1998 | last post by:
I have a page that creates dynamic textboxes based on the number of fields a user chooses to fill out. This process worked great when the page was standalone. However, when I move to a...
3
2074
by: Alex Maghen | last post by:
Hi. I'm a little confused about the code that resides in the code-behind of a MasterPage and the code that resides in the code-behind of the actual pages that USE that MasterPage. I'm noticing,...
0
967
by: Stan SR | last post by:
Hi, It's maybe a stupid question. I have a class that I call from each of my pages. I would like to know if it's possible to "instantiate" this class from my masterpage and call all the...
4
3960
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: ...
2
2198
by: =?Utf-8?B?RGFsZQ==?= | last post by:
I have an app with a MasterPage. In the MasterPage is a user control with several public properties and methods that I want exposed to the content page. Rather than writing several redirection...
6
9118
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" %>...
2
1307
by: Poofactory | last post by:
HI, I have a control on a content page that I need to access and modify a MasterPage variable. I can find the control alright: if (Parent.Page.Master.FindControl("Adserver_TopBanner1") !=...
0
7251
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,...
0
7148
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...
0
7430
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...
1
7089
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...
0
5673
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,...
0
4743
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...
0
3230
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...
0
3217
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
451
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.