Using K# macro methods in ASCX transformations

Yehuda Lando asked on August 14, 2014 20:24

Hi,

I usualy use text/xml transformations, but in certain cases where I need to use custom controls, I use ASCX transformations.

I have many custom k# methods, and I would like to use them without having to copy this code around. Is this possible?

In one ascx transformation I had this: <%# ResolveMacros("{%Ativ.GetAuthorName(AuthorID)%}") %>, which I'm pretty sure used to work, doesn't work, but returns no errors.

Thanks

Recent Answers


Juraj Ondrus answered on August 15, 2014 00:37

Hi,

Macros are not supported in ASCX transformations. You need to resolve them just like you would in the API inside a SCRIPT tag. Or, I would also try using = instead of # in the markup: <%= ResolveMacros...

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.