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


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. – Stefan Hennicken Apr 23 '12 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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