Custom field value as ASCX wrapper class

Katha I asked on December 8, 2020 16:19

Hi,

how can I use the value of a custom page type field as a css class on my ASCX master template, e.g. as a wrapper class?

Thank you.

Correct Answer

Brenden Kehren answered on December 8, 2020 18:53

Create a custom macro method. Your macro method should have all the proper logic and error handling in it. Then use the global macro in the master template. I suggest creating a public static method that your macro calls so you can use the static method in your .cs files as well as in your macro.

0 votesVote for this answer Unmark Correct answer

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