StringWriter和HtmlTextWriter

   Response.Clear();
       StringWriter sw = new StringWriter();
       HtmlTextWriter htw = new HtmlTextWriter(sw);
       rpData.RenderControl(htw);

  (divPanel.RenderControl(hw);)
       Response.Write(sw.ToString());
       Response.End();

HttpWebRequest和HttpWebResponse

   using System.Text;
        using System.IO;
    using System.Net;

   string title = "MINI迷你购注册验证,欢迎您注册。";
         string Site_Url = "http://e.shhuiya.com/user/RegisterChecked.aspx?uname=" + Uname;
         HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(Site_Url);
         HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();

         StreamReader sReader = new StreamReader(myResponse.GetResponseStream(), System.Text.Encoding.UTF8);
         string content = sReader.ReadToEnd();
         sReader.Close();
         myResponse.Close();
         string uemail = DBClass.ExecuteScalar("SELECT UEMAIL FROM TBUSER WHERE UEMAIL='" + Uname + "'");
          Common.SendMail.SendSingleMail(uemail, title, content.ToString());