如何在Render方法中修改替换HtmlTextWriter中的内容

protected override void Render(HtmlTextWriter writer)
    {
        StringWriter stringWriter=new StringWriter();
        HtmlTextWriter oldwriter=new HtmlTextWriter(stringWriter);
        base.Render(oldwriter);

        string oldContent =stringWriter.ToString();

        string newContent = oldContent.Replace("aaaa/", "");

        writer.Write(newContent);
    }

 

 

http://www.cnblogs.com/xhan/archive/2007/12/26/1015263.html

posted on 2012-06-28 17:03  chen110xi  阅读(230)  评论(0编辑  收藏  举报