1 Attachment(s)
[RESOLVED] [2.0] XML to Dynamic ASP .NET 2.0/HTML - C# Example
I found a great article on how to create Dynamic HTML from a XML Document.
http://www.codeproject.com/aspnet/xm...44&msg=1599344
The sample is in .net 1.0.
When I try to convert the project to .NET 2.0 I have a problem because the XSLTransform class is deprecated. The new class that replaced it is XSLCompiledTransform.
I have included the xslt file(default.xslt), the XML document(cx.config) and the c# code. XmlXslTransforer.cs is the class code that needs to use the new xslcompiledtransform class.
The "result" string in the XmlXslTransforer.cs sample class will contain the end result of the transform.
It should contain table/asp/html code with several controls
I think the problem is a security issue but have not had any luck fixing it with the new class.
Here is the attachment in a zip file
Re: [2.0] XML to Dynamic ASP .NET 2.0/HTML - C# Example
Is it necessary for me to download the file to know what the problem is?
Is it being rendered incorrectly or is it just an error message?
Re: [2.0] XML to Dynamic ASP .NET 2.0/HTML - C# Example
There is no error message. It is being rendered incorrectly.
I found out that you can now use error debug tracing as it transforms in vs 2005.
When I start debugging this line should be pulling the Page Title and it isn't.
<xsl:value-of select="FORM/PAGES/PAGE[@id=$pageid]/@title" />
This line should be executing to get all the fields inside the page
<xsl:for-each select="FORM/PAGES/PAGE[@id=$pageid]/FIELDS/FIELD">
For some reason something has changed between 1.0 and 2.0 .net that is making the transform not work with the cx.config and default.xslt files that worked in .net 1.0