我是编程新手,但我会先展示代码,然后解释我想做什么
private void ModalBody()
{
LoadTemplateOverride();
divModalBody.InnerHtml =
}
private void LoadTemplateOverride()
{
string templateURL = String.Format("{0}/leadgen/eodemails/templatecontroller.aspx?eodid={1}", site.Get("InternalApiUrl"), Email.ID);
HttpWebRequest request = HttpWebRequest.Create(templateURL) as HttpWebRequest;
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
tbSubject.Text = response.Headers["EmailSubject"];
tbBody.Text = (new StreamReader(response.GetResponseStream())).ReadToEnd();
}
所以我想要做的是将“LoadTemplateOverride”调用到 ModalBody,然后divModalBody.InnerHtml =
从 ModalBody(new StreamReader(response.GetResponseStream())).ReadToEnd();
与 LoadTemplateOverride 相等。但是每当我这样做时,它都无法识别“响应”...