You can call xslt macro from xslt but not .net macro. You may need to refactor your code and put the condition in the template using .net then you could selectively show a macro depending on your condition.
Ismail is right, xslt macros can't call .net macros.
But... could you turn your .net macros into functions within an xslt extension (they're easy to make)? Then you could use an xslt macro for the 'outer' logic and the functions from your xslt extension to execute the code that you now have in .ascx macros. Make sense?
how would you call a ascx based macro from within xslt?
I'm looking for the best-practice for displaying a number of macro's (ascx based) conditionally...
so my datatype has some properties:
"showpoll"
"showlatestsposts",
and depening on them i need to call ascx based macro's from within an xslt ..
how is this done?
Kind regards,
Rik
Rik,
You can call xslt macro from xslt but not .net macro. You may need to refactor your code and put the condition in the template using .net then you could selectively show a macro depending on your condition.
Regards
Ismail
Ismail is right, xslt macros can't call .net macros.
But... could you turn your .net macros into functions within an xslt extension (they're easy to make)? Then you could use an xslt macro for the 'outer' logic and the functions from your xslt extension to execute the code that you now have in .ascx macros. Make sense?
cheers,
doug.
is working on a reply...