Bonekrusher
Active member
- Joined
- Jul 4, 2007
- Messages
- 38
- Programming Experience
- 1-3
I am trying to create a method to allow transforming of XML. The following code gets hung up on :
docXsl.Transform(docXml, Nothing, Response.Output)
I get the following error:
"Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class."
How do I fix this?
docXsl.Transform(docXml, Nothing, Response.Output)
I get the following error:
"Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class."
How do I fix this?
VB.NET:
Partial Class _Default
Inherits System.Web.UI.Page
Public Shared Sub mytransform(ByVal myxml As String, ByVal myxslt As String)
Dim docXml As New System.Xml.XmlDocument()
docXml.Load(myxml)
Dim docXsl As New System.Xml.Xsl.XslCompiledTransform()
docXsl.Load(myxslt)
Dim myoutput As String = "c:\temp\mytest.html"
docXsl.Transform(docXml, Nothing, Response.Output)
End Sub
End Class