Adding eventhandler to usercontrol from masterpage
Hi.
I have this usercontrol macro sitting on my master page. From the codebehind of my masterpage I would like to register eventhandlers for a specific event. How do I do that?
This is what I'm trying to accomplish:
userControl1.PurchaseAccepted += new x.PurchaseAcceptedEventHandler(userControl1_PurchaseAccepted);
When I use Page.FindControl I only get the macro object. I would instead like to get my hands on the regular .net usercontrol type that the macro represents.
Adding eventhandler to usercontrol from masterpage
Hi.
I have this usercontrol macro sitting on my master page. From the codebehind of my masterpage I would like to register eventhandlers for a specific event. How do I do that?
This is what I'm trying to accomplish:
When I use Page.FindControl I only get the macro object. I would instead like to get my hands on the regular .net usercontrol type that the macro represents.
Please Advice
/Alex
Hi Aleksander
Maybe this blogpost could provide you with the solution? http://farmcode.org/post/2011/01/28/Creating-code-behind-files-for-Umbraco-templates.aspx
/Jan
Take a look here.. might help: http://msdn.microsoft.com/en-us/library/xxwa0ff0.aspx
is working on a reply...