日期:2014-05-17  浏览次数:21010 次

当前上下文中不存在名称,这是怎么回事
public class EmailSender
  {
  protected void ActiveLink(object sender, EventArgs e)
  {
  //string loginName = this.txtLoginName.Text.Trim();
  //string password = this.txtPassword.Text.Trim();
  //string Email= this.txtEmail.Text.Trim();
  string sUserID = Users.RegisterClient(txtLoginName.Text.Trim(), txtEmail.Text.Trim(), txtPassword.Text.Trim()).ToString();
  string sData = File.ReadAllText(Server.MapPath("~/NewMemberEmail.txt"));// 读取邮件内容的文本文件
  //Response.Write(sData);
  string Sguid=Request.QueryString["UserID"].Trim();
  sData = sData.Replace("[Name]", txtLoginName.Text.Trim());
  sData = sData.Replace("[LINK]", "Http://www.allchinadata.com" + "/page.aspx?Guid="+Sguid);//定义链接地址
  //sData = sData.Replace("[LINK1]","[LINK]");
  sData = sData = sData.Replace("[UserName]",txtLoginName.Text.Trim());
  sData = sData = sData.Replace("[Pwd]", txtPassword.Text.Trim());
  SMTPManager.SendEmail("allchina@allchinadata.com",txtLoginName.Text.Trim(), txtEmail.Text.Trim(), sData, "New Member Activation", false);
  // response.Redirect("Login.aspx");
  }

------解决方案--------------------
问题有点不明确,初步判断没有声明
------解决方案--------------------
http://www.cnblogs.com/conis/archive/2007/07/16/1720597.html
看了这个网站你就明白了,是因为复制粘贴的事情