Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Can I use code-behind in RenderingTemplate? It's not possible to just use code-behind like using it in an application page.

What am I missing to use my own code inside a RenderingTemplate

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

You don't have code behind in rendering template, but you can create your own user control, which is part of rendering template. And your user control can have code behind.

Please visit this similar post for details.

share|improve this answer
    
Thanks for your reply. I added a usercontrol to my template and it works. –  Stefan Hennicken Apr 23 '12 at 13:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.