Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
How to get and set the property value of a macro in C#.
Ex : i created a macro of a user control and placed in master page template. Now i created a macro property in the template.
Now how can i get or set the property value in the user control.
Hi Sudeer
What version of Umbraco are you using? I'm asuming 4.x - If so have a look at the documentation here http://our.umbraco.org/documentation/Reference/Management/Documents/ in the section called "Creating a Document and setting properties" you should find the answer :)
If you're using v6 checkout the documentation for the new API's in the same section of our.
Hope this helps.
/Jan
Hi Jan,
Thanks for your reply..
We are using 4.7.0 version, and we tried the same way which is posted in the url given by you but still we are unable to read the property value in the page_init
Thanks
Sudeer
Hi Sudeer,
does your property setup in the macro look like in the screenshot?
Matthias
Hi Matthias
Yes, it is setup in the parameters list.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Read Macro Property value in c#
How to get and set the property value of a macro in C#.
Ex : i created a macro of a user control and placed in master page template. Now i created a macro property in the template.
Now how can i get or set the property value in the user control.
Hi Sudeer
What version of Umbraco are you using? I'm asuming 4.x - If so have a look at the documentation here http://our.umbraco.org/documentation/Reference/Management/Documents/ in the section called "Creating a Document and setting properties" you should find the answer :)
If you're using v6 checkout the documentation for the new API's in the same section of our.
Hope this helps.
/Jan
Hi Jan,
Thanks for your reply..
We are using 4.7.0 version, and we tried the same way which is posted in the url given by you but still we are unable to read the property value in the page_init
Thanks
Sudeer
Hi Sudeer,
does your property setup in the macro look like in the screenshot?
Matthias
Hi Matthias
Yes, it is setup in the parameters list.
is working on a reply...