SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

Your Answer


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.