Umbraco 7 runs in MVC mode by default and UserControls won't work in that. Go to umbracosettings.config and change <defaultRenderingEngine>Mvc</defaultRenderingEngine> to <defaultRenderingEngine>WebForms</defaultRenderingEngine>. After that if you create a template it will be a masterpage instead of a Razor file. If you call the macro in the masterpage template inside the form tag it should work.
User Control not rendering data!
Hii everyone!
I am Ravindra..
i have used a user control in my umbraco7...
user control has a button and a label..by default the label visibility is false..
on button click event i have written that label1.visible=true;
now i created a macro with this user control!
i called it in my template when i preview it button is appearing but i clicked on it no text of label is coming
please help me!
Regards..
Ravindra
Hello,
Umbraco 7 runs in MVC mode by default and UserControls won't work in that. Go to umbracosettings.config and change <defaultRenderingEngine>Mvc</defaultRenderingEngine> to <defaultRenderingEngine>WebForms</defaultRenderingEngine>. After that if you create a template it will be a masterpage instead of a Razor file. If you call the macro in the masterpage template inside the form tag it should work.
However it's better to keep using MVC in Umbraco 7 instead of webforms. This blog might help: http://umbraco.com/follow-us/blog-archive/2013/7/14/moving-from-webforms-to-mvc.aspx
Jeroen
Thank you very much jeroen!
Regards,
Ravindra!
thanks to both of you.....It worked for me.....
is working on a reply...