Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

I need a page to reference a property on Site.Master

Posted on 2011-02-11
5
Medium Priority
?
427 Views
Last Modified: 2012-05-11
In the code behind of Site.Master I created an object, and want certain properties of that object made visible to "child" pages which use that Site.Master file.

Can I do that?

Thanks,
newbieweb
0
Comment
Question by:newbieweb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 13

Accepted Solution

by:
devlab2012 earned 2000 total points
ID: 34872392

create public properties and in the content page add MasterType directive like <@MasterType.........
0
 

Author Comment

by:newbieweb
ID: 34872535
Could you please include the entire line, including the sample page/object name? I don't really get it.

Thanks,
newbieweb
0
 

Author Comment

by:newbieweb
ID: 34872733
Would that definition be in place of MasterPageFile="~/Site.master" ?

It sounds like this would then be a strongly typed definition, compared to using a MasterPageFile.

True?
0
 

Author Comment

by:newbieweb
ID: 34872792
I added this line:

<%@ MasterType VirtualPath="~/Site1.Master" %>

to the page, but do not know how to reference the property on the Site object.

Could you tell me?
0
 

Author Closing Comment

by:newbieweb
ID: 34872863
Got it!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question