Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am trying to access a property on master page from user control.

Its a string type property and I want to set its value from user control.
Any ideas how to achieve this...
Posted

I have never done it from a user control, but try adding a virtual path to the master page.
<%@ MasterType VirtualPath="~/Site.master" %>


Then, just reference the variable using Master.myVariable, I think.

Sorry, I am on my phone and can't check properly :(
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900