📄 实现多控件的互相选择.txt
字号:
private void Button2_Click(object sender, System.EventArgs e)
{
while (ListBox1.Items.Count!=0)
ListBox2.Items.Add(new ListItem(ListBox1.Items[0].Value ));
ListBox1.Items.Remove(ListBox1.Items[0].Value);
}
private void Button5_Click(object sender, System.EventArgs e)
{
while (ListBox2.Items.Count!=0)
ListBox2.Items.Add(new ListItem(ListBox2.Items[0].Value));
ListBox2.Items.Remove(ListBox2.Items[0].Value);
}
private void Button3_Click(object sender, System.EventArgs e)
{
if(ListBox1.SelectedIndex!=-1)
ListBox2.Items.Add( new ListItem(ListBox1.SelectedItem.Value));
ListBox1.Items.Remove(ListBox1.SelectedItem.Value);
}
private void Button4_Click(object sender, System.EventArgs e)
{
if(ListBox2.SelectedIndex!=-1)
ListBox1.Items.Add(new ListItem(ListBox2.SelectedItem.Value));
ListBox2.Items.Remove(ListBox2.SelectedItem.Value);
}
private void Button6_Click(object sender, System.EventArgs e)
{
string url;
if(TextBox1.Text!="")
{
url="lianxi2.aspx?TextBox1="+TextBox1.Text;
Response.Redirect(url);
}
else
{
Label1.Text="请输入用户名";
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -