在我的代码隐藏中,我在Page_Load事件中从sql db创建了一个清单列表,在button_click事件中从清单列表中获取了所有获取值,等等。 
因此,当我选中一些复选框然后单击我的按钮时,第一件事是我的page_load事件重新创建了复选框列表,因此在运行我的获取复选框值时没有选中任何复选框...我错过了在page_load事件中添加如果(!this.IsPostBack)
protected void Page_Load(object sender, EventArgs e)
{
   if (!this.IsPostBack)
   {
      
      SqlConnection dbConn = new SqlConnection(WebConfigurationManager.ConnectionStrings["ConnString"].ConnectionString);
      string query;
      try
      {
        query = "SELECT [name], [mail] FROM [users]";
        dbConn.Open();
        SqlDataAdapter da = new SqlDataAdapter(query, dbConn);
        DataSet ds = new DataSet();
        da.Fill(ds);
        if (ds.Tables[0].Rows.Count != 0)
        {
          checkboxlist1.DataSource = ds;
          checkboxlist1.DataTextField = "name";
          checkboxlist1.DataValueField = "mail";
          checkboxlist1.DataBind();
        }
        else
        {
          Response.Write("No Results found");
        }
       }
       catch (Exception ex)
       {
          Response.Write("<br>" + ex);
       }
       finally
       {
          dbConn.Close();
       }
   }
}
protected void btnSend_Click(object sender, EventArgs e)
 {
   string strChkBox = string.Empty;
   foreach (ListItem li in checkboxlist1.Value)
    {
      if (li.Selected == true)
       {
         strChkBox += li.Value + "; ";    
         
       }
    }
   Response.Write(strChkBox);
 }
输出如预期的那样,以分号分隔的列表供我在mailsend函数中使用:
    bill@contoso.com; jeff@corp.inc; sam@dot.net
一个小问题的长答案。请注意,我距离专家还很远,并且知道有更好的解决方案,但这可能会对某些人有所帮助。