Friday, May 23, 2008

How to get generated html of a page and change it.

public override void Render(System.Web.UI.HtmlTextWriter writer)
{
    StringBuilder sb = new StringBuilder();
    HtmlTextWriter htw = new HtmlTextWriter(new StringWriter(sb));
    base.Render(htw);
    string html = sb.ToString();
    ///
    /// Example
    /// 
    html.Replace("<b>""<strong>");
    html.Replace("</b>""</strong>");
    /// 
    /// Insert the meta tags
    /// Insert webtrends meta tags
    /// Move hidden system inserted fields
    /// Move viewstate
    /// Perform SEO checks
    /// And finally, write the HTML to original writer
    writer.Write(html);
}

No comments:

iPhone Launch Screen Sizes

iPhone Portrait iOS 8 Retina HT 5.5 = 1242 X 2208 Retna HD 4.7 = 750 X 1134 iPhone Landscape iOS 8 Retina HD 5.5  2208 X 1242 iPho...