您是如何读取模板的?

#region 读取邮件模版
 StringBuilder sb = new StringBuilder();
 string letterPath = System.Configuration.ConfigurationManager.AppSettings["LetterPath"];
                    string path = letterPath + "index.htm";
                    //string path = "index.htm";
 using (StreamReader sr = new StreamReader(new FileStream(path, FileMode.Open), Encoding.Default))
                    {
                        string line;
                        while ((line = sr.ReadLine()) != null)
                        {
                            sb.Append(line);
                            sb.Append(("\r\n"));//??????
                        }
                    }
                    #endregion

posted @ 2008-07-09 18:31  roboth  阅读(414)  评论(0)    收藏  举报