473,385 Members | 1,958 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,385 software developers and data experts.

Running a MasterPage method from within default.aspx?

Hi,

I have an ASP.NET application with a MasterPage that has a method
defined as public. Now I want to run this MasterPage method from
INSIDE the default.aspx page.

I know there has to be a way of doing this!

Anybody know?

Thanks
Steve

May 16 '07 #1
2 1235
Easy:
Just define your master page in the page (HTML) declaration section as
follows:
<%@ masterType TypeName="MyMasterClassName" %>
and then inside your code behind you will be able to write:
Master.MyMasterPublicMethod
"Steve Kershaw" wrote:
Hi,

I have an ASP.NET application with a MasterPage that has a method
defined as public. Now I want to run this MasterPage method from
INSIDE the default.aspx page.

I know there has to be a way of doing this!

Anybody know?

Thanks
Steve

May 17 '07 #2
"Steve Kershaw" <st***********@yahoo.comwrote in message
news:11*********************@u30g2000hsc.googlegro ups.com...
Hi,

I have an ASP.NET application with a MasterPage that has a method
defined as public. Now I want to run this MasterPage method from
INSIDE the default.aspx page.

I know there has to be a way of doing this!
http://steveorr.net/faq/PassDataToMaster.aspx
--
http://www.markrae.net

May 17 '07 #3

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

Similar topics

0
by: Herman verschooten | last post by:
Hi, I am creating my first real ASP.NET 2.0 site and want to use the some of the new features. I created a masterpage with my main layout and added several contentpages, no problem so far. I...
11
by: simon | last post by:
Hello, I'm helping write a .net app, we are using VS2005 and asp/vb.net for code we are using the "masterPage.master" technique, within the masterpage we have an asp:contentplaceholder that is...
6
by: =?Utf-8?B?QmVuIFIu?= | last post by:
Hi, WHen I specify my master page in the page's @Page directive, no problems. However, when I put it ias an attribute in Web.config's page element, the designer fails. It just says "Error...
7
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...
8
by: Randy Smith | last post by:
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
4
by: Torben Laursen | last post by:
I want to change the label of a component that I have on a masterpage but I cannot get my hands on it I have a mastepage MP2 that has a button called B2 masterpage MP2 uses masterpage MP1 that has...
4
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.
1
by: =?Utf-8?B?bWFya203NQ==?= | last post by:
There is probably some simple answer to my question, but i'm still new to this a bit.. I have a master page.. with a menu system which is coded onto the masterpage.aspx... it uses A tags with...
6
by: Peter Larsen [CPH] | last post by:
Hi, Are there a way to show both ContentPlaceHolser's at the same time ?? The following code show two ContentPlaceHolders, but i don't know what to do to make them both visible at the same time....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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,...

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.