2012年微软认证考试考前冲刺试题6
09-07
0


QUESTION 11
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You write the following code fragment.
 
 
 
You need to ensure that when you click the Button1 control, a selected list of items move from the ListBox1 control to the ListBox2 control.
Which code segment should you use?
 
A.foreach (ListItem li in ListBox1.Items) { if (li.Selected) { ListBox2.Items.Add(li); ListBox1.Items.Remove(li); }
}
B.foreach (ListItem li in ListBox1.Items) { if (li.Selected) { li.Selected = false; ListBox2.Items.Add(li); ListBox1.Items.Remove(li); }
}
C.foreach (ListItem li in ListBox1.Items) { if (li.Selected) { li.Selected = false; ListBox2.Items.Add(li); }
}
D.foreach (ListItem li in ListBox2.Items) { if (ListBox1.Items.Contains(li)) ListBox1.Items.Remove(li); }
E.foreach (ListItem li in ListBox1.Items) { if (li.Selected) { ListBox1.Items.Remove(li); }
}
F.foreach (ListItem li in ListBox1.Items) { if (ListBox2.Items.Contains(li)) ListBox1.Items.Remove(li); }

Answer: CD 
 
 
QUESTION 12
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You write the following code fragment.
 
1 
2 
3 
 
You also add a MultiView control named MultiView1 to the Web page. MultiView1 has three child View controls.
You need to ensure that you can select the View controls by using the DropDownList1 DropDownList control.
Which code segment should you use?
 
A.int idx = DropDownList1.SelectedIndex; MultiView1.ActiveViewIndex = idx;
B.int idx = DropDownList1.SelectedIndex; MultiView1.Views[idx].Visible = true;
C.int idx = int.Parse(DropDownList1.SelectedValue); MultiView1.ActiveViewIndex = idx;
D.int idx = int.Parse(DropDownList1.SelectedValue); MultiView1.Views[idx].Visible = true;

Answer: A

相关内容

热门资讯

2014年微软认证:微软认证V... 2014年微软认证:微软认证Version:V2.38考试必备经典试题8
2014年微软认证:微软认证V... 2014年微软认证:微软认证Version:V2.38考试必备经典试题6
微软认证考试基于.NET的We... 微软认证考试基于.NET的Web应用程序开发模拟试题四
2014年微软认证:微软认证V... 2014年微软认证:微软认证Version:V2.38考试必备经典试题4
2014年微软认证:微软认证V... 2014年微软认证:微软认证Version:V2.38考试必备经典试题5
2014年微软认证:微软认证V... 2014年微软认证:微软认证Version:V2.38考试必备经典试题10
2014年微软认证:微软认证V... 2014年微软认证:微软认证Version:V2.38考试经典试题2
2014年微软认证:微软认证V... 2014年微软认证:微软认证Version:V2.38考试经典试题7
2012年微软认证考试备考模拟... 2012年微软认证考试备考模拟试题5
2014年微软认证:微软认证V... 2014年微软认证:微软认证Version:V2.38考试经典试题1