Parser Error Message: Cannot create an object of type 'System.Web.UI.WebControls.Unit' from its string representation 'number([#height])' for the 'Height' property.
Height is defined as number in the macro - the input comes from a document where it is defined as numeric.
Oh - my bad... forgot one very annoying thing: You can't use "width" or "height" as names for Macro parameters because they clash with some built in .NET stuff.
Use with a prefix, like "imgWidth" and "imgHeight" and it'll work (still shouldn't use number() within the attributes, though)
Numeric parameter to macro
Hi
I'm trying to create a slideshow using xslt, butI have a problem
passing the numeric value height to the macro
I get this error . also without the number()
Parser Error Message: Cannot create an object of type 'System.Web.UI.WebControls.Unit' from its string representation 'number([#height])' for the 'Height' property.
Height is defined as number in the macro - the input comes from a
document where it is defined as numeric.
What is wrong here?
Paul S
Hi Paul,
You're using an XPath function (number()) within an ASP.NET tag - that won't work.
You can do the cast within the XSLT file if needed (typically not needed), e.g.:
/Chriztian
Oh - my bad... forgot one very annoying thing: You can't use "width" or "height" as names for Macro parameters because they clash with some built in .NET stuff.
Use with a prefix, like "imgWidth" and "imgHeight" and it'll work (still shouldn't use number() within the attributes, though)
/Chriztian
Thanks Chriztian
That was the solution!
This works
Thanks
/Paul S
is working on a reply...