I have followed several wiki and forum posts on here trying to get this going, with no luck.
In the ascx file code-behind class I have the following:
public
string
BrokerName
get {return ViewState["brokerName"].ToString();}
set {ViewState["brokerName"] = value
;}
In Umbraco I added the control property to the macro and when I add the macro, I am asked for a value. In the node itselft I have a brokerName property and so for the value of the macro property I write:
I can't see where I went wrong. When I load the page I get an "object reference not set to an instance of an object" error. In the call stack I see this is fired from the get method of the property.
Access usercontrol properties
Hi,
I have followed several wiki and forum posts on here trying to get this going, with no luck.
In the ascx file code-behind class I have the following:
<umbraco:Macro BrokerName="[#brokerName]" Alias="activationForm" runat="server"></umbraco:Macro>
I can't see where I went wrong. When I load the page I get an "object reference not set to an instance of an object" error. In the call stack I see this is fired from the get method of the property.
I'm a little lost.
Thank you!
-Elad
Ok. I figured it out myself.
Using the viewstate does not work. I used a provate member instead and it works great.
Ya learn something new everyday :)
is working on a reply...