微軟認證考試 70-562考試復習題



《微軟認證考試 70-562考試復習題》由會員分享,可在線閱讀,更多相關《微軟認證考試 70-562考試復習題(63頁珍藏版)》請在裝配圖網(wǎng)上搜索。
1、Microsoft_CertifyMe_70-562_v2010-08-02_95q_by-Anika Number: 70-562 Passing Score: 700 Time Limit: 120 min File Version: 2010-08-02 Exam 70-562 QUESTION 1 You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a Web page that conta
2、ins the following two XML fragments. (Line numbers are included for reference only.)
01
04 3、t="server"
11 Text='<%# Eval("LineTotal") %>' />
12
10
13
4、greater than seven characters, the column is displayed in red color. What should you do? A. Insert the following code segment at line 06. OnItemDataBound="FmtClr" Insert the following code segment at line 02. protected void FmtClr (object sender, ListViewItemEventArgs e) { Label LineTotal =
5、(Label) e.Item.FindControl("LineTotalLabel"); if ( LineTotal.Text.Length > 7) { LineTotal.ForeColor = Color.Red; } else { LineTotal.ForeColor = Color.Black; } } B. Insert the following code segment at line 06. OnItemDataBound="FmtClr" Insert the following code segment at line 02.
6、protected void FmtClr (object sender, ListViewItemEventArgs e) { Label LineTotal = (Label) e.Item.FindControl("LineTotal"); if ( LineTotal.Text.Length > 7) {LineTotal.ForeColor = Color.Red; } else {LineTotal.ForeColor = Color.Black; } } C. Insert the following code segment at line 06.
7、 OnDataBinding="FmtClr" Insert the following code segment at line 02. protected void FmtClr(object sender, EventArgs e) { Label LineTotal = new Label(); LineTotal.ID = "LineTotal"; if ( LineTotal.Text.Length > 7) {LineTotal.ForeColor = Color.Red; } else { LineTotal.ForeColor = Color.Blac
8、k; } } D. Insert the following code segment at line 06. OnDataBound="FmtClr" Insert the following code segment at line 02. protected void FmtClr(object sender, EventArgs e) { Label LineTotal = new Label(); LineTotal.ID = "LineTotalLabel"; if ( LineTotal.Text.Length > 7) {LineTotal.ForeC
9、olor = Color.Red; } else {LineTotal.ForeColor = Color.Black; } } Answer: A Section: (none) Explanation/Reference: QUESTION 2 You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a Web form and add the following code fragment.
10、
11、he Quantity column values from a table named Products. You write the following code segment to create the rptData_ItemDataBound event handler. (Line numbers are included for reference only.) 01 protected void rptData_ItemDataBound(object sender, 02 RepeaterItemEventArgs e) 03 { 04 05 if(
12、lbl != null) 06 if(int.Parse(lbl.Text) < 10) 07 lbl.ForeColor = Color.Red; 08 } You need to retrieve a reference to the lblQuantity Label control into a variable named lbl. Which code segment should you insert at line 04? A. Label lbl = Page.FindControl("lblQuantity") as Label; B. Lab
13、el lbl = e.Item.FindControl("lblQuantity") as Label; C. Label lbl = rptData.FindControl("lblQuantity") as Label; D. Label lbl = e.Item.Parent.FindControl("lblQuantity") as Label; Answer: B Section: (none) Explanation/Reference: QUESTION 3 You create a Microsoft ASP.NET application
14、 by using the Microsoft .NET Framework version 3.5. Your application has a user control named UserCtrl.ascx. You write the following code fragment to create a Web page named Default.aspx. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> ...
15、
16、ntrols. What should you do? A. Write the following code segment in the Init event of the Default.aspx Web page. Control ctrl = LoadControl("UserCtrl.ascx"); this.Controls.AddAt(1, ctrl); B. Write the following code segment in the Init event of the Default.aspx Web page. Control ctrl = LoadC
17、ontrol("UserCtrl.ascx"); lblHeader.Controls.Add(ctrl); C. Add a Literal control named Ltrl between the lblHeader and lblFooter label controls. Write the following code segment in the Init event of the Default.aspx Web page. Control ctrl = LoadControl("UserCtrl.ascx"); D. Add a PlaceHolder cont
18、rol named PlHldr between the lblHeader and lblFooter label controls. Write the following code segment in the Init event of the Default.aspx Web page. Control ctrl = LoadControl("UserCtrl.ascx"); PlHldr.Controls.Add(ctrl); Answer: D Section: (none) Explanation/Reference: QUESTION 4 Y
19、ou 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.
21、 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) { Vi
22、ewState["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. protected override
23、 object SaveViewState() { LoadControls(); return base.SaveViewState(); } B. protected override void Render(HtmlTextWriter writer) { LoadControls(); base.Render(writer); } C. protected override void OnLoadComplete(EventArgs e) { base.OnLoadComplete(e); LoadControls(); } D. protected override
24、 void LoadViewState(object savedState) { base.LoadViewState(savedState); LoadControls(); } Answer: D Section: (none) Explanation/Reference: QUESTION 5 You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create the following controls: A
25、composite custom control named MyControl. A templated custom control named OrderFormData. You write the following code segment to override the method named CreateChildControls() in the MyControl class. (Line numbers are included for reference only.) 01 protected override void 02 CreateChildCon
26、trols() { 03 Controls.Clear(); 04 OrderFormData oFData = new 05 OrderFormData("OrderForm"); 06 07 } You need to add the OrderFormData control to the MyControl control. Which code segment should you insert at line 06? A. Template.InstantiateIn(this); this.Controls.Add(oFData); B. T
27、emplate.InstantiateIn(oFData); Controls.Add(oFData); C. this.TemplateControl = (TemplateControl)Template; -Can't Remember All-??? oFData.TemplateControl = (TemplateControl)Template; Controls.Add(oFData); D. this.TemplateControl = (TemplateControl)oFData; -Can't Remember All-??? Controls.Ad
28、d(oFData); Answer: B Section: (none) Explanation/Reference: QUESTION 6 You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a composite custom control named MyControl. You need to add an instance of the OrderFormData control to the
29、 MyControl control. Which code segment should you use? A. protected override void CreateChildControls() { Controls.Clear(); OrderFormData oFData = new OrderFormData("OrderForm"); Controls.Add(oFData); } B. protected override void RenderContents(HtmlTextWriter writer) { OrderFormData
30、 oFData = new OrderFormData("OrderForm"); oFData.RenderControl(writer); } C. protected override void EnsureChildControls() { Controls.Clear(); OrderFormData oFData = new OrderFormData("OrderForm"); oFData.EnsureChildControls(); if (!ChildControlsCreated) CreateChildControls(); } D.
31、 protected override ControlCollection CreateControlCollection() { ControlCollection controls = new ControlCollection(this); OrderFormData oFData = new OrderFormData("OrderForm"); controls.Add(oFData); return controls; } Answer: A Section: (none) Explanation/Reference: QUESTIO
32、N 7 You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a custom control named OrderForm. You write the following code segment. public delegate void CheckOrderFormEventHandler(EventArgs e); private static readonly object CheckOrderFormKey = ne
33、w object(); public event CheckOrderFormEventHandler CheckOrderForm { add { Events.AddHandler(CheckOrderFormKey, value); } remove { Events.RemoveHandler(CheckOrderFormKey, value); } } You need to provide a method that enables the OrderForm control to raise the CheckOrderForm event. Which c
34、ode segment should you use? A. protected virtual void OnCheckOrderForm(EventArgs e) { CheckOrderFormEventHandler checkOrderForm = (CheckOrderFormEventHandler)Events[ typeof(CheckOrderFormEventHandler)]; if (checkOrderForm != null) checkOrderForm(e); } B. protected virtual void OnCheckOrder
35、Form(EventArgs e) { CheckOrderFormEventHandler checkOrderForm = Events[CheckOrderFormKey] as CheckOrderFormEventHandler; if (checkOrderForm != null) checkOrderForm(e); } C. CheckOrderFormEventHandler checkOrderForm = new CheckOrderFormEventHandler(checkOrderFormCallBack); protected virtual v
36、oid OnCheckOrderForm(EventArgs e) { if (checkOrderForm != null) checkOrderForm(e); } D. CheckOrderFormEventHandler checkOrderForm = new CheckOrderFormEventHandler(checkOrderFormCallBack); protected virtual void OnCheckOrderForm(EventArgs e) { if (checkOrderForm != null) RaiseBubbleEvent(ch
37、eckOrderForm, e); } Answer: B Section: (none) Explanation/Reference: QUESTION 8 You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You add a TextBox control named TextBox1. You write the following code segment for validation. protected
38、 void CustomValidator1_ServerValidate( object source, ServerValidateEventArgs args) { DateTime dt = String.IsNullOrEmpty(args.Value) DateTime.Now : Convert.ToDateTime(args.Value); args.IsValid = (DateTime.Now - dt).Days < 10; } You need to validate the value of TextBox1. Whic
39、h code fragment should you add to the Web page?
A.
41、stomValidator>
44、ue="<%= DateTime.Now; %>" > 45、alidation logic for the control is implemented in the Validate method in the following manner.
protected static bool Validate(string value) { ...
} You need to override the method that validates the value of the related control.
Which override method should you use?
A.
protected override bool 46、 EvaluateIsValid() { string value = GetControlValidationValue( this.Attributes["AssociatedControl"]); bool isValid = Validate(value); return isValid; }
B.
protected override bool ControlPropertiesValid() { string value = GetControlValidationValue(this.ValidationGroup); bool isValid = Validate(valu 47、e); return isValid; }
C.
protected override bool EvaluateIsValid() { string value = GetControlValidationValue(this.ControlToValidate); bool isValid = Validate(value); return isValid; }
D.
protected override bool ControlPropertiesValid() { string value = GetControlValidationValue( this.Attributes 48、["ControlToValidate"]); bool isValid = Validate(value); this.PropertiesValid = isValid; return true; }
Answer: C
Section: (none)
QUESTION 10
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You add an XmlDataSource control named XmlDataSource 49、1 to the Web page.
XmlDataSource1 is bound to an XML document with the following structure.
50、 file of the Web page.
protected void BulletedList1_Click( ?object sender, BulletedListEventArgs e) { //...
}
You need to add a BulletedList control named BulletedList1 to the Web page that is bound to XmlDataSource1.
Which code fragment should you use?
A.
52、ember="ID" onclick="BulletedList1_Click"> 54、 Microsoft .NET Framework version 3.5.
You write the following code fragment.
56、i); }
}
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 Lis 57、tBox2.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
S 58、ection: (none)
Explanation/Reference:
QUESTION 12
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You write the following code fragment.
60、t 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(DropDown 61、List1.SelectedValue); MultiView1.ActiveViewIndex = idx;
D.
int idx = int.Parse(DropDownList1.SelectedValue); MultiView1.Views[idx].Visible = true;
Answer: A
Section: (none)
Explanation/Reference:
ActiveViewIndex is Zero base Index.
QUESTION 13
You create a Microsoft ASP.NET applicati 62、on by using the Microsoft .NET Framework version 3.5.
To add a Calendar server control to a Web page, you write the following code fragment.
63、hould you do?
A.
Add the following code segment to the Calendar1 DayRender event handler.
if (e.Day.IsWeekend) {
Day.IsSelectable = false;
}
B.
Add the following code segment to the Calendar1 DayRender event handler.
if (e.Day.IsWeekend) {
if (Calendar1.SelectedDates.Contains(e.Day.Dat 64、e))
Calendar1.SelectedDates.Remove(e.Day.Date);
}
C.
Add the following code segment to the Calendar1 SelectionChanged event handler.
List 65、Week == DayOfWeek.Sunday) {
list.Add(st);
}
}
foreach (DateTime dt in list) {
(sender as Calendar).SelectedDates.Remove(dt);
}
D.
Add the following code segment to the Calendar1 DataBinding event handler.
List 66、ender as Calendar).SelectedDates) {
if (st.DayOfWeek == DayOfWeek.Saturday || st.DayOfWeek == DayOfWeek.Sunday) {
list.Add(st);
}
}
foreach (DateTime dt in list) {
(sender as Calendar).SelectedDates.Remove(dt);
}
Answer: A
Section: (none)
Explanation/Reference:
QUESTION 14
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You define the following class.
public class Product {
public decimal Price { get; set;
- 溫馨提示:
1: 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
2: 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
3.本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
5. 裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年作風建設學習教育開展情況的報告范文
- 在2025年民營企業(yè)座談會上的主持講話范文
- 在2025年全縣教育領域群眾身邊不正之風和腐敗問題集中整治調度會上的講話范文
- 工委副書記在2025年機關DeepSeek應用專題輔導培訓班開班儀式上的講話范文
- 在2025年DeepSeek大模型政務應用培訓會上的講話范文
- 在青年干部培訓結業(yè)典禮上的講話文稿
- 2025年副書記防汛工作會議上的講話范文
- 2025年主管商務部門黨組書記在理論學習中心組會上研討發(fā)言文稿
- 2025年國企黨委關于干部職工思想政治工作情況的報告范文
- 在機關單位作風建設學習教育突出問題專項整治工作部署會議上的講話范文
- 醫(yī)院領導2025年黨風廉政建設推進會上的講話范文
- 2025年關于開展“以案促改”工作實施方案供參考
- 在2025年安全生產專項整治暨化工行業(yè)風險防控部署會上的講話范文
- 領導干部在“十五五”發(fā)展規(guī)劃編制啟動會上的講話文稿
- 2025年書記在慰問老干部暨情況通報會上的主持講話提綱范文