J
Jeffery Tyree
The webservice code:
public class WebService1:yadayada
{
public string sFN;
[WebMethod]
public void CreateFile (string strFileName)
{
sFN = "C:\\inetpub\\" + strFileName;
}
[WebMethod]
public void WriteFile(string strText)
{
using (StreamWriter sw = File.AppendText(sFN))
{
sw.WriteLine(strText);
}
}
}
Although "sFN" is defined even as public within the class and assigned a
value in CreateFile, the variable goes NULL when it is used in WriteFile.
The client application does not use this variable in its code. How do I
properly define "sFN" so that it can be used in multiple webmethods?
TIA,
-Jeff
public class WebService1:yadayada
{
public string sFN;
[WebMethod]
public void CreateFile (string strFileName)
{
sFN = "C:\\inetpub\\" + strFileName;
}
[WebMethod]
public void WriteFile(string strText)
{
using (StreamWriter sw = File.AppendText(sFN))
{
sw.WriteLine(strText);
}
}
}
Although "sFN" is defined even as public within the class and assigned a
value in CreateFile, the variable goes NULL when it is used in WriteFile.
The client application does not use this variable in its code. How do I
properly define "sFN" so that it can be used in multiple webmethods?
TIA,
-Jeff