Sign in | Join
Last post 09-25-2009 10:35 PM by jamxi. 2 replies.
Sort Posts: Oldest to newest Newest to oldest
I have a masterPage with codebehind defining some variables. I also have a control on the master page that is meant to display content based on the variables I set in the codebehind of the masterpage. What I'm wondering is there a way to access the variables I created on the masterpage from inside the user control? I've been struggling with this for awhile and can't seem to find a way to do this? Any help would be greatly appreciated.
Thanks
hi,
declare a property in master page to return the variable and use that in your usercontrol
I couldn't get that to work either. I could access the property from the code behind of the page, but not from the user control. I ended up creating a class instead as a work around. From what I've found online my problem seems to be common thing of not working the way I'm trying to do it. Anyway thanks for the suggestion.