473,326 Members | 2,805 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,326 software developers and data experts.

How to access content page from inside master page

Is it possible to access the classname (or type) of the content page
from inside the master page? I'm trying to do some security model in
the master page, without having to add to each individual page in the
solution.

Thanks in advance.

Sep 15 '06 #1
2 1408
If you pull the current Page from the master page, it will be the page you
are hitting. You can then get anything that the Page object contains.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
<Si*******@gmail.comwrote in message
news:11********************@m73g2000cwd.googlegrou ps.com...
Is it possible to access the classname (or type) of the content page
from inside the master page? I'm trying to do some security model in
the master page, without having to add to each individual page in the
solution.

Thanks in advance.

Sep 15 '06 #2
Fantastic. Thanks! I see you can do ContentPlaceHolder.Page to do
this!
Cowboy (Gregory A. Beamer) wrote:
If you pull the current Page from the master page, it will be the page you
are hitting. You can then get anything that the Page object contains.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
<Si*******@gmail.comwrote in message
news:11********************@m73g2000cwd.googlegrou ps.com...
Is it possible to access the classname (or type) of the content page
from inside the master page? I'm trying to do some security model in
the master page, without having to add to each individual page in the
solution.

Thanks in advance.
Sep 15 '06 #3

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

Similar topics

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...
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...
7
by: pushpadant | last post by:
Hi, I have one master page which has some table inside one of the <td> i have my contentplaceholder. on the <head> tag of the master page i have specified link to a global CSS...
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: ...
3
by: vikramp | last post by:
Hi, I am still new to ASP.NET 2.0 and trying to develope something using Master pages. My problem is: I have a master page that contains Logo image and a navigation menu at the top of the...
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" %>...
2
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") !=...
3
by: eselk2003 | last post by:
I'm just starting out with VWD 2008, and new to ASP .NET. I have a master page which displays one record for an Access database based on an ID number in the query string. Then I have a content...
2
by: Gaspar | last post by:
I have a MasterPage with a SqlDatSource named "myDS". In a content page placed inside a ContentPlaceHolder I have a GridView that I need to connect to myDS. The problem is that "myDS" is not...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.