I am making a small webshop and need to add an input fields and a button for each item in a list. My plan was to make a usercontrol with thees options, an then render the usercontrol for each item in an XSLT list. But hov is that posible?
Hmm, don't think xslt is best fit for these kind of tasks... instead, why not going for listing all items in the user controls? For example, you could use a standard asp.net repeater or datagrid control and bind your umbraco data to that control!
My rule of thumb has always been: 'If you only need to present/list data, then go with an xslt macro, if you need to capture data or subscribe to control events, use user controls'
How to use Usercontrols in XSLT
I am making a small webshop and need to add an input fields and a button for each item in a list. My plan was to make a usercontrol with thees options, an then render the usercontrol for each item in an XSLT list. But hov is that posible?
Thanks in advance.
Hmm, don't think xslt is best fit for these kind of tasks... instead, why not going for listing all items in the user controls? For example, you could use a standard asp.net repeater or datagrid control and bind your umbraco data to that control!
umbraco.tv has a great video on this subject, it might be worth watching those...
My rule of thumb has always been: 'If you only need to present/list data, then go with an xslt macro, if you need to capture data or subscribe to control events, use user controls'
Cheers,
/dirk
Thanks for your reply!
The reason for using the XSLT was that it would be easier to reuse the control for the webdesigner.
is working on a reply...