This renders an empty div but the content fail to render in it so the macro is half-working. I am suspecting it is connected to the lifecycle of the page. The macro has a page_load event that probably is skipped or something like that. The ascx content loads but the code behind doesn't execute so it must be a page lifecycle timing issue.
Render ascx user control from razor macro in Umbraco 4.7
I've had this problem before and never got it to work but this time I have no alternative way of going around it and really need to get this working.
I have a simple ascx control that reads an RSS feed and outputs it in simple html. The code behind is pretty simple.
Then I have a razor script that renders an entire page and within a certain area of that page I want to add my ascx control.
If I add the control straight on the template like this:
it works well but the blog entries appear outside the content.
So from inside the razor script I do something like this:
This renders an empty div but the content fail to render in it so the macro is half-working. I am suspecting it is connected to the lifecycle of the page. The macro has a page_load event that probably is skipped or something like that. The ascx content loads but the code behind doesn't execute so it must be a page lifecycle timing issue.
Any ideas? Many thanks
Hi All,
I've a problem similar to this.(may be same)
ie;
User controls htmls are getting rendered. but its like the page_load is not working.
Please save my life.
is working on a reply...