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

1 Answer 1


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.

  • Thanks for your reply. I added a usercontrol to my template and it works. Commented Apr 23, 2012 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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