假如DropDownList控件里有3个值,如何把DropDownList控件里的这3个值都取出来,付给一个变量,中间用逗号隔开!帮帮忙,谢谢你们了!!!!!!

解决方案 »

  1.   

    string tmpString=string.Empty;
            for (int index = 0; index < this.DropDownList1.Items.Count; index++)
            {
                if (string.Empty != tmpString)
                    tmpString += ",";
                tmpString += this.DropDownList1.Items[index].Text;
            }
      

  2.   

    bitpolar()  谢谢你了,我今天没有多少分,下次再多补你点,呵呵