ASPX templates
Version 7.x > ASPX templates > Execute widget marco in an ASPX template. View modes: 
User avatar
Member
Member
seanbun - 1/25/2013 1:14:33 AM
   
Execute widget marco in an ASPX template.
I have set up a long text(formatted text) field in a document type which allow users to pick a biz form from the widget button in the texteditor nav bar. After picking a bizform, it generates a macro like this:
{^widget|(name)BizForm|(BizFormName)MyBizForm|(image_guid)c99e75ad-dce9-4cf0-a561-79e249ffd41c|(widget_displayname)On-line+form^}

My question is how could I execute this marco and display the bizform in a aspx template?

Thank you.

User avatar
Member
Member
seanbun - 1/25/2013 1:44:14 AM
   
RE:Execute widget marco in an ASPX template.
I have tried to use below method

CMSContext.CurrentResolver.ResolveMacros([macrotext]).ToString());

but it returned the same macro text.

User avatar
Kentico Support
Kentico Support
kentico_janh - 1/29/2013 5:11:15 AM
   
RE:Execute widget marco in an ASPX template.
Hello,

You need to call following method in your code:
ControlsHelper.ResolveDynamicControls(this);

Best regards,
Jan Hermann

User avatar
Member
Member
seanbun - 1/29/2013 4:48:42 PM
   
RE:Execute widget marco in an ASPX template.
Excellent method. Found more useful information on this page. Thanks.

http://devnet.kentico.com/Blogs/Martin-Hejtmanek/December-2010/How-to-Resolving-the-inline-controls.aspx