I get the following error in main.aspx concerning the line 'test.load("file");'
Compiler Error Message: CS1519: Invalid token '(' in class, struct, or interface member declaration
*******************************
here is main.aspx:
*******************************
********************************
here is my class (xml.aspx)
*******************************
Compiler Error Message: CS1519: Invalid token '(' in class, struct, or interface member declaration
*******************************
here is main.aspx:
*******************************
Code:
<!--#include virtual="xml.aspx" -->
<script language="c#" runat=server>
XmlApp test = new XmlApp("/structure.xml");
test.load("file");
</script>
********************************
here is my class (xml.aspx)
*******************************
Code:
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Text" %>
<script language="c#" runat=server>
public class XmlApp {
XmlDocument document;
string filePath;
XmlNode node;
public XmlApp (string filePath) {
this.filePath = filePath;
document = new XmlDocument();
}
public void load (string filePath) {
document.Load(this.filePath);
}
}
</script>