错哪了?在线!!!!
<% @ Page language="C#"%>
<script language="C#" runat="server">
public void ToRigtList(object sender,EventArgs e)
{
for(int i=0; i<lbox1.Items.Count;i++)
{
ListItem item=lbox1.Items[i];
if(item.Selected)
{
lbox2.Items.Add(item);
lbox1.Items.Remove(item);
}
}
}
public void ToLeftList(object sender,EventArgs e)
{
for(int i=0; i<lbox2.Items.Count;i++)
ListItem item=lbox2.Items[i];
if(item.Selected)
{
lbox1.Items.Add(item);
lbox2.Items.Remove(item);
}
}
</script>
<html>
<head>
<title><title>
</head>
<body>
<b>ListBox演示</b>
<hr>
<form runat="server">
<table>
<tr>
<td>
<b>ListBox容器1:</b><br>
<asp:ListBox id="lbox1" Rows=5 SelectionMode="Multiple" runat="server">
<asp:ListItem>天天</asp:ListItem>
<asp:ListItem>天健</asp:ListItem>
<asp:ListItem>皇帝</asp:ListItem>
<asp:ListItem>皇后</asp:ListItem>
<asp:ListItem>靖靖</asp:ListItem>
</asp:ListBox>
</td>
<td>
<asp:Button id="ToRight" Text="-->" OnClick="ToRightList" runat="server"/>
<asp:Button id="ToLeft" Text="<--" OnClick="ToLeftList" runat="server"/>
</td>
<td>
<b>ListBox容器2:</b><br>
<asp:ListBox id="lbox2" Rows=5 SelectionMode="Multiple" runat="server"/>
</td>
</form>
</body>
</html>
<script language="C#" runat="server">
public void ToRigtList(object sender,EventArgs e)
{
for(int i=0; i<lbox1.Items.Count;i++)
{
ListItem item=lbox1.Items[i];
if(item.Selected)
{
lbox2.Items.Add(item);
lbox1.Items.Remove(item);
}
}
}
public void ToLeftList(object sender,EventArgs e)
{
for(int i=0; i<lbox2.Items.Count;i++)
ListItem item=lbox2.Items[i];
if(item.Selected)
{
lbox1.Items.Add(item);
lbox2.Items.Remove(item);
}
}
</script>
<html>
<head>
<title><title>
</head>
<body>
<b>ListBox演示</b>
<hr>
<form runat="server">
<table>
<tr>
<td>
<b>ListBox容器1:</b><br>
<asp:ListBox id="lbox1" Rows=5 SelectionMode="Multiple" runat="server">
<asp:ListItem>天天</asp:ListItem>
<asp:ListItem>天健</asp:ListItem>
<asp:ListItem>皇帝</asp:ListItem>
<asp:ListItem>皇后</asp:ListItem>
<asp:ListItem>靖靖</asp:ListItem>
</asp:ListBox>
</td>
<td>
<asp:Button id="ToRight" Text="-->" OnClick="ToRightList" runat="server"/>
<asp:Button id="ToLeft" Text="<--" OnClick="ToLeftList" runat="server"/>
</td>
<td>
<b>ListBox容器2:</b><br>
<asp:ListBox id="lbox2" Rows=5 SelectionMode="Multiple" runat="server"/>
</td>
</form>
</body>
</html>
...全文
相关推荐
MATLAB图像错切_matlab_图像处理_水平错切_图像错切_
读入一幅图像,对其进行水平错切、垂直错切
项目总结做一个项目的总结。给自己看!!!!
做一个项目的总结。给自己看!!!!做一个项目的总结。给自己看!!!!做一个项目的总结。给自己看!!!!做一个项目的总结。给自己看!!!!做一个项目的总结。给自己看!!!!
fedora14下载种子!!!!
fedora14下载种子!!!! fedora14下载种子!!!! fedora14下载种子!!!!
constantdanger:持续的危险!!!!
持续的危险!!!! 英特尔物联网黑客马拉松项目。 你知不知道,此时此刻,你正处于危险之中? 危害遍及现代生活的方方面面——甚至是黑客马拉松。 在 Constant Danger,我们的目标是根据您周围的环境告知您当前的风险水平。 安装 到你的爱迪生上 git 克隆 :alexose/constantdanger.git cd常数危险 安装 节点应用程序.js
集中设置工具,很好用,顶起!!!!
集中设置工具,很好用,顶起!!!!集中设置工具,很好用,顶起!!!!集中设置工具,很好用,顶起!!!!集中设置工具,很好用,顶起!!!!集中设置工具,很好用,顶起!!!!集中设置工具,很好用,顶起!!!!集中设置工具,很好用,顶起!!!!集中设置工具,很好用,顶起!!!!集中设置工具,很好用,顶起!!!!集中设置工具,很好用,顶起!!!!集中设置工具,很好用,顶起!!!!设置


