Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Using macro on VisualStudio. View modes: 
User avatar
Member
Member
William Awaji - 10/3/2011 8:12:05 AM
   
Using macro on VisualStudio.
Can I use a macro parameter on the Visual Studio in a aspx webpage?

I want to pass a href url with macro parameters (querystring). It is possible?

User avatar
Member
Member
William Awaji - 10/5/2011 1:28:40 PM
   
RE:Using macro on VisualStudio.
i resolved my problem using this :

CMS.CMSHelper

Example:

CMS.CMSHelper.CMSContext.CurrentPageInfo.NodeAliasPath


So it can be helpful for someone else

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 10/9/2011 11:22:43 AM
   
RE:Using macro on VisualStudio.
Hi, thanks for an update.

In aspx page code, you can directly access the CMSContext...

Anyway, the macro expressions can be resolved in code using
string CMS.CMSHelper.CMSContext.CurrentResolver.ResolveMacros(string inputText)

as written in the DevGuide Appendix A - Macro expressions.

Regards,
Zdenek C.