2005年08月22日
//请参考下面的例子
void Page_Load(){
.
Response.Charset="";阅读全文>
发表于 @ 2005年08月22日 17:17:00|评论(loading...)|编辑
private void WriteXmlToFile(DataSet thisDataSet) {
if (thisDataSet == null) { return; }
// Create a file name to write to.
string filename = "myXmlDoc.xml";
// Create the FileStream to write with.
System.IO.FileStream myFileStream = new System.IO.FileStream
(filename, System.IO.FileMode.Create);
// Create an XmlTextWriter with the fileStream.
System.Xml.XmlTextWriter myXmlWriter =
new System.Xml.XmlTextWriter(myFileStream, System.Text.Encoding.阅读全文>
发表于 @ 2005年08月22日 17:16:00|评论(loading...)|编辑
//生成HTML页
public static bool WriteFile(string strText,string strContent,string strAuthor)
{
string path = HttpContext.Current.Server.MapPath("/news/");
Encoding code = Encoding.GetEncoding("gb2312");
// 读取模板文件
string temp = HttpContext.Current.Server.MapPath("/news/text.html");
StreamReader sr=null;
StreamWriter sw=null;
string str="";
try阅读全文>
发表于 @ 2005年08月22日 17:14:00|评论(loading...)|编辑
这是当年赶工的网站用到的东东, 结果快做完了警察叔叔来个网站要备案,朋友不干了,我也停工了,
翻出来共享了~
阅读全文>
发表于 @ 2005年08月22日 17:11:00|评论(loading...)|编辑