On my page right now, I call a function:
<%=getMenu()%>
in my codebehind, I have the function do an xslt transformation:
sub
xslt.Transform(doc, xslArg, Response.Output, Nothing)
end sub
Instead of calling the function directly on the main page, I now want to
just place a literal on the page and set the literal's text via codebehind.
However, I can't seem to do this:
ltl_menu.Text = xslt.Transform(doc, xslArg, Response.Output, Nothing)
As the 'expression does not return a value'.
How can one get the result of the text as a string?
-Darrel
Pascal Schmitt - 03 Nov 2005 01:07 GMT
Hello!
> ltl_menu.Text = xslt.Transform(doc, xslArg, Response.Output, Nothing)
>
> As the 'expression does not return a value'.
>
> How can one get the result of the text as a string?
Don't write it to Response.Output but use StringWriter: (untested)
StringWriter sw = new StringWriter();
xslt.Transform( doc, xslArg, sw, null );
ltk_menu.Text = sw.ToString();
There is also an XSLT-WebControl...

Signature
Pascal Schmitt
darrel - 03 Nov 2005 01:54 GMT
> Don't write it to Response.Output but use StringWriter: (untested)
>
[quoted text clipped - 3 lines]
>
> There is also an XSLT-WebControl...
aha! perfect! Thanks!
-Darrel