Don't miss out Virtual Happy Hour today (April 26).

Try our conversational search powered by Generative AI!

Adding property to master page in webforms from external page.

Vote:
 

Hello!
 
I'm trying to add a property to a masterpage from an external page of the type ContentArea.
Normally I'd be able to reference the property from the model, but I can't do that now(that I know of). I've tried creating a property in the codebehind for the master page and then assigning the property from a startpage reference(in the onload method), but I can't find any of the assembly classes that can hold the property...(in either system.web.ui.webcontrols or episerver.web.webcontrols).

I'm quite a junior developer so I appologize if some of my terms are a bit off :) if you need clarification to understand the problem, please ask away!

Cheers!

#203798
May 07, 2019 14:44
Vote:
 

Apparently all I had to do was this in the site.master page:

<EPiServer:Property PropertyName="MyProperty" PageLink="<%# PageReference.StartPage %>" runat="server" ID="MyId">

it fixed the databind and everything!

Hope this might help someone some day, cheerio! :)

#203839
May 08, 2019 15:41
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.