I am creating a C# TBB(C# Code fragment). For that I need to write a userdefined method. I tried creating it using <%! %>. How to access the user defined method in the code. Thanks in advance. Please suggest me a way to solve this issue.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The TOM.NET API reference provides the following example:
In addition to the above, the following syntax is supported:
Imports the namespace enclosed between the quotation marks into the code fragment. Any class you import must be present in the Global Assembly Cache.
Declares methods, constants and classes for the rest of the code fragment to use. The declarations cannot contain the string ‘%>’. Note that any classes you create can only be referenced within the code fragment.
Runs a specific .NET Assembly Template Building Block, identified by the URI in the Template attribute. This statement is typically generated by SDL Tridion 2009 itself when you upload a .NET assembly, to provide access to a specific class in the .NET Assembly.
Inserts a reference to a nonstandard .NET assembly, which must be present in the Global Assembly Cache. Use the full assembly name.