-2

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 can email this ....

how can i achieve it?

3
  • Possible duplicate of Sending email in asp .net. You will need to formulate the message mark-up, but that's a different question. Commented Jun 15, 2011 at 10:58
  • 2
    @Mr. Disappointment, I don't think he's asking how to email. He wants to get the HTML so he can email it. Question isn't clear though. Commented Jun 15, 2011 at 11:06
  • 1
    @George: I figured the OP wanted both. Yep, unclear. Commented Jun 15, 2011 at 11:09

1 Answer 1

2

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(); } 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.