Is it possible to use Dynamic content and render an ASP.NET LinkButton and somehow capture the event when someone clicks the button? Or is Dynamic content just meant for outputting data, without interactivity?
If it is indeed possible, I would appreciate some small code sample to get me on the right track.
You can use a usercontrol (.ascx) as dynamic content. Not for just ouput but also user interaction. Here is an great article http://world.episerver.com/Documentation/Items/Tech-Notes/EPiServer-CMS-6/EPiServer-CMS-6-R2/Dynamic-Content/.
Thanks!I guess I will have to return a reference to a user control in the implemented method GetControl, and return true in RendersWithControl.
Either that or turn the user control directly into a dynamic content plugin: http://tedgustaf.com/en/blog/2011/4/creating-dynamic-content-in-episerver-cms-6-r2/
Doing it the "old school" way gives you more control though, and beware that there is a flaw in the implementation of property storage when you use the decoreate-usercontrol-approach that will garble up your data if you add a property to your dynamic content at a later stage: http://world.episerver.com/Blogs/Magnus-Rahl/Dates/2011/4/Property-problems-in-DynamicContentBase--Control-based-Dynamic-content/