如何在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

原文地址:https://www.cnblogs.com/chen110xi/p/2568226.html