当前位置:MCPD(70-562)题库

问题:

[单选]

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create two user controls named UserCtrlA.ascx and UserCtrlB.ascx. The user controls postback to the server. 
You create a new Web page that has the following ASPX code:  
<asp:CheckBox ID="Chk" runat="server"    
oncheckedchanged="Chk_CheckedChanged"   
AutoPostBack="true" />  
<asp:PlaceHolder ID="PlHolder" runat="server"></asp:PlaceHolder>  
To dynamically create the user controls, you write the following code segment for the Web page:  public void LoadControls() 
{ 
if (ViewState["CtrlA"] != null) 
{ 
Control c; 
if ((bool)ViewState["CtrlA"] == true) 
{ 
c = LoadControl("UserCtrlA.ascx"); 
} else { 
c = LoadControl("UserCtrlB.ascx"); 
}  
c.ID = "Ctrl"; 
PlHolder.Controls.Add(c); 
} 
}  
protected void Chk_CheckedChanged(object sender, EventArgs e) 
{ 
ViewState["CtrlA"] = Chk.Checked; PlHolder.Controls.Clear(); 
LoadControls(); 
}  
You need to ensure that the user control that is displayed meets the following requirements: It is recreated during postback It retains its state.  
Which method should you add to the Web page?()

A . A
B . B
C . C
D . D

在《词源》中,张炎首先确立了()的审美标准;其次,他又提出了()的审美要求,第三,他还提出了()的审美要求。 兼容性测试 利用“【对象】>【修整】>【焊接】”命令对多个对象进行焊接,处理后的对象将采用什么样的填充和轮廓。() 采用位于最上层对象的填充和轮廓。 采用位于最下层对象的填充和轮廓。 采用最后一个被选定对象的填充和轮廓。 采用第一个被选定对象的填充和轮廓。 《中华人民共和国特种设备安全法》规定,负责特种设备安全监督管理的部门对依法办理使用登记的特种设备应当建立完整的监督管理档案和() 网上公示系统。 检索系统。 信息查询系统。 社会主义初级阶段的根本任务是:() 实现四个现代化。 集中精力发展生产力。 改革经济、政治体制。 发展社会主义民主。

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create two user controls named UserCtrlA.ascx and UserCtrlB.ascx. The user controls postback to the server. 
You create a new Web page that has the following ASPX code:  
<asp:CheckBox ID="Chk" runat="server"    
oncheckedchanged="Chk_CheckedChanged"   
AutoPostBack="true" />  
<asp:PlaceHolder ID="PlHolder" runat="server"></asp:PlaceHolder>  
To dynamically create the user controls, you write the following code segment for the Web page:  public void LoadControls() 
{ 
if (ViewState["CtrlA"] != null) 
{ 
Control c; 
if ((bool)ViewState["CtrlA"] == true) 
{ 
c = LoadControl("UserCtrlA.ascx"); 
} else { 
c = LoadControl("UserCtrlB.ascx"); 
}  
c.ID = "Ctrl"; 
PlHolder.Controls.Add(c); 
} 
}  
protected void Chk_CheckedChanged(object sender, EventArgs e) 
{ 
ViewState["CtrlA"] = Chk.Checked; PlHolder.Controls.Clear(); 
LoadControls(); 
}  
You need to ensure that the user control that is displayed meets the following requirements: It is recreated during postback It retains its state.  
Which method should you add to the Web page?()

参考答案:

  参考解析

本题暂无解析

在线 客服