I am getting FileNotFound Exception:Could not find file 'C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\pub2endnote.xsl'.I have my XSL file in the same directory as my .aspx.cs file. I am not sure why it is looking up this directory?
Also,the text file obtained is having html tags within it.Is there any way to get rid of those?
Here is my code fragment:
DataSet ds = new DataSet("pubs");
OleDbDataAdapter sda_type = new OleDbDataAdapter(pubtype_sql, conn);
sda_type.Fill(ds, "pubtype");
sda_year.Fill(ds, "pubyear");
//Response.Flush();
int currYear = DateTime.Now.Year;
string defaultWhere = " and year(pubdate) >= " + (currYear - 1 + " or inpress = 1");
OleDbDataAdapter sda = new OleDbDataAdapter(pub_sql + defaultWhere + pub_sql_order, conn);
sda.Fill(ds, "publications");
xmlPubList.DocumentContent = ds.GetXml();
xmlPubList.TransformSource = pub_xsl_web;
XmlDocument doc = new XmlDocument();
doc.LoadXml(ds.GetXml());
doc.Save("CurrentXml.xml");
XslTransform myXslTransform = default(XslTransform);
XPathDocument myXPathDocument = default(XPathDocument);
myXslTransform = new XslTransform();
myXslTransform.Load("pub2endnote.xsl");
System.IO.StringWriter stWrite = new System.IO.StringWriter();
myXslTransform.Transform("CurrentXml.xml", "C:\\Documents and Settings\\collegian\\Desktop\\EndNoteFormat.txt");