Try our conversational search powered by Generative AI!

Newbie Question Nr.3


Hello everyone, its monday and I hope you all had a nice weekend!

Its the happy student back with another newbie question, note: I am working on/learning in episerver 4.60.

I am making a usercontrol that inherits from EPiServer.UserControlBase, and it is placed on the mainpage. It needs to access propertys from another page, how do I go about doing that?

Kind Regards

Mar 30, 2009 13:31

Just load the page.

Something like (untested code from the top of my head :) ):

PageData page = Global.EPDatafactory.GetPage(new PageReference(page_id));

label1.text = page["mainbody"]  as string;

Mar 30, 2009 14:20
Ok problem solved, thank you Greger!
Mar 30, 2009 14:47

or page.Property["mainbody"] to get the value as a porperty.

page["mainbody"] will return the "inner" value of a property while using the Property[]will give you the value as the property.

Mar 30, 2009 23:30
* 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.