本帖最后由 shikun125 于 2011-05-29 18:46:34 编辑

解决方案 »

  1.   

    insertQXLB += t.ID + ",";
      

  2.   


    protected void btn_Click(object sender, EventArgs e)
            {
                string insertQXLB = "";
                foreach (TreeNode t in TreeView1.CheckedNodes)
                {
                    if (t.Checked)
                    {
                        insertQXLB += t.id + ",";
                    }
                }
                Common.Constant.Show(this.Page, insertQXLB);//弹出窗口
            }
      

  3.   

    TreeView生成的CheckBox好像没有id的吧……
      

  4.   

    你是要获取数据库中的id值?
    如果是的话绑定的时候给value绑定id,text绑定你数据库中要显示的文本。
    另外一点foreach (TreeNode t in TreeView1.CheckedNodes)//这个代表的就是选中的复选框了
                {
                    if (t.Checked)//这里不用在判断了
                    {
                        insertQXLB += t.Value + ",";
                    }
                }
      

  5.   

    foreach (Control c in this.rptOutList.Controls) 
                    {
                        CheckBox cbx = (CheckBox)c.FindControl("checkbox1"); 
                        TextBox tbx = (TextBox)c.FindControl("tbxTableName"); 
                        if (cbx != null) 
                        { 
                            if (cbx.Checked == true) 
                            {
                                BusinessTemporaryOutStorageExpireUnLockIM bisUnlockIM = new BusinessTemporaryOutStorageExpireUnLockIM();
                                bisUnlockIM.BillOutNo = tbx.Text.ToString().Trim();                        } 
                        } 
                    }