Inserting C#-written functions in pages

Topics: General, Troubleshooting
Mar 28, 2011 at 1:39 PM

Hello everybody

I'm a newcomer, and I just wanted to create a simple page in Composite. I made the page first, then I wrote a C# function which returns pure HTML (a simple unordered list). I'd like to use this function in my page. I've seen in tutorial movies that it's possible to insert functions into the pages and at runtime or preview, the result of the function would be put in the response at the function insertion point.

But when I selection Insertion -> Function, I can't find my C# function inside functions list.

What is the problem. Do I have to publish my function first, cause there is no publish link for functions.

Or, can I use C# written functions directly inside pages?


Thank you


Mar 28, 2011 at 2:41 PM

Did you go into "view source" mode of your page before trying to insert the function?

Mar 30, 2011 at 6:25 AM

Hi burningice

Going to source view did it. Thank you :)

Mar 30, 2011 at 1:29 PM

You should take a look at this discussion as well Here it's discussed how returing XhtmlDocument from the function will make it show up in the Visual Editor, and not only when viewing source.