public DiyPage(string title, string content) { Page = new StringBuilder(); string pagestr = DoIo.Reader(DoIo.ApppDatapath + @"txt.html").Replace("<title></title>", "<title>" + title + "</title>"); pagestr = pagestr.Replace("<div id='content'>", "<div id='content'>" + content); Page.Append(pagestr); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString.Count > 0) { if (Request.QueryString["txt"].Length > 0) { string text = DoIo.Reader(Server.MapPath(Request.QueryString["txt"].ToString())); text = text.Remove(1, text.IndexOf("<div id='content'>")); text = text.Replace("</body>", ""); text = text.Replace("</html>", ""); FreeTextBox1.Text = text; } if (Request.QueryString["title"].Length > 0) { TextBox1.Text = Request.QueryString["title"].ToString(); } } } }