---------------------------------------------------- <asp:ListBox 选中多个项----------------------------------------------------
<asp:ListBox CssClass="listFrame" ID="lbxCars" runat="server" Height="360px" Width="200px" SelectionMode="Multiple" >
</asp:ListBox>
string strParams= Request.QueryString["column1"].Trim();
string[] arrstrParams= strParams.Split(',');
if (arrstrParams!= null && arrstrParams.Length >0)
{
for (int i=0;i<arrstrParams.Length;i++)
{
string param= arrstrParams[i];
lbxCars.Items.FindByValue(param).Selected =true;
}
}
<asp:ListBox 选中多个项-
最新推荐文章于 2019-07-13 16:03:05 发布
本文介绍如何使用ASP中的ListBox实现多项选择功能,并通过QueryString传递参数来预选中指定的选项。

1487

被折叠的 条评论
为什么被折叠?



