I need to have a list of items that are in a database displayed on my web form.
In the old days I would have an xlst macro call some custom routine, or create a aspx usercontrol and voila done.
Now, with xslt, I think I need ta create a partialview and a custom (surface)controller+model to feed the data.
The thing is nog, that i can;t figure out how to get this done.
Mvc implementation of good-old Usercontrols
Hi Guys,
I stopped using Umbraco at v4.x and now try to jumpstart into v7.x
The first thing i ran into is; I used to develop "usercontrols" and place them on the (webforms) page. Nice and neet.
I need to do something like that in the current Mvc version. But how..... I kind finf the right tutorial....
In short: i want to have a Partial View that get's it's data from a custom controller.
Hello,
With MVC you could do an Html.Action to a surface controller: https://our.umbraco.org/documentation/reference/routing/surface-controllers
Or you could use route hijacking to have a controller before rendering a template: https://our.umbraco.org/documentation/reference/routing/custom-controllers
This example project might help: https://our.umbraco.org/projects/developer-tools/hybrid-framework-for-umbraco-v7
Jeroen
raaaa this is driving me insane! Wy is there no step-by-step tutorial to do exactly what i want!
Ok, let me explain what I want to / need to do:
I need to have a list of items that are in a database displayed on my web form. In the old days I would have an xlst macro call some custom routine, or create a aspx usercontrol and voila done.
Now, with xslt, I think I need ta create a partialview and a custom (surface)controller+model to feed the data.
The thing is nog, that i can;t figure out how to get this done.
Please help me!
Hi Roland
I think you can use route hijacking as said Jeroen
https://our.umbraco.org/documentation/reference/routing/custom-controllers
Use RenderController for filling page model with custom data, and then just render it in view or partial as you want.
Thanks,
Alex
is working on a reply...