如题,请有此类控件的兄弟支持一下,谢谢

解决方案 »

  1.   

    <tr>
      <td width="25%" align="center" valign="middle" style="HEIGHT: 100px;">会员级别</td>
      <td width="25%" align="center" valign="middle" ><asp:ListBox ID="jb_txt" SelectionMode="Multiple" runat="server" Width="70px" Height="200px" ></asp:ListBox></td>
      <td width="25%" align="center" valign="middle" style="HEIGHT: 100px;">访问部门</td>
      <td width="25%" align="center" valign="middle" ><asp:ListBox ID="bmmanage_txt" SelectionMode="Multiple" runat="server" Width="70px"  Height="200px"></asp:ListBox></td>
    </tr>cs代:               jb_txt.DataSource = rs;
                    jb_txt.DataValueField = "jbid";
                    jb_txt.DataTextField = "jbname";
                    jb_txt.DataBind();
      赋值:              //给jb_txt赋值选择开始
                    string[] jbidarray= jbid.Split(','); //利用数组 
                    foreach (ListItem temp in jb_txt.Items)
                    {
                          foreach (string temp2 in jbidarray) //如果用for()。则取jbidarray.Length
                          {
                              if (temp.Value == temp2)
                                  temp.Selected = true;
                          }
                    }
                    //给jb_txt赋值选择完毕
                //取jb_txt值
                string haostr = "";
                foreach (ListItem temp in jb_txt.Items)
                {
                    if (temp.Selected)
                        haostr += temp.Value + "," ;
                }
                if (haostr.Length>0)
                    haostr = haostr.Substring(0, haostr.Length - 1);
                //取jb_txt值完毕
      

  2.   

    我也想要一份
    有没有人可以发一份给我
    [email protected]