开发者

Send email of ASP.net Page HTML

let say I have shopping cart I send all detail to one page name as emailsender.aspx this page read all cart information(products,qty,price) from session and show it in datarepeater control then i want this page html so i开发者_JS百科 can email this ....

how can i achieve it?


To get the HTML that a control produces, you could use code below, found here.

public string RenderControl(Control ctrl) 
{
    StringBuilder sb = new StringBuilder();
    StringWriter tw = new StringWriter(sb);
    HtmlTextWriter hw = new HtmlTextWriter(tw);

    ctrl.RenderControl(hw);
    return sb.ToString();
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜