歡迎來到裝配圖網(wǎng)! | 幫助中心 裝配圖網(wǎng)zhuangpeitu.com!
裝配圖網(wǎng)
ImageVerifierCode 換一換
首頁 裝配圖網(wǎng) > 資源分類 > DOC文檔下載  

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

  • 資源ID:161531569       資源大?。?span id="ln2g2w4" class="font-tahoma">489KB        全文頁數(shù):63頁
  • 資源格式: DOC        下載積分:10積分
快捷下載 游客一鍵下載
會員登錄下載
微信登錄下載
三方登錄下載: 支付寶登錄   QQ登錄   微博登錄  
二維碼
微信掃一掃登錄
下載資源需要10積分
郵箱/手機:
溫馨提示:
用戶名和密碼都是您填寫的郵箱或者手機號,方便查詢和重復下載(系統(tǒng)自動生成)
支付方式: 微信支付   
驗證碼:   換一換

 
賬號:
密碼:
驗證碼:   換一換
  忘記密碼?
    
友情提示
2、PDF文件下載后,可能會被瀏覽器默認打開,此種情況可以點擊瀏覽器菜單,保存網(wǎng)頁到桌面,就可以正常下載了。
3、本站不支持迅雷下載,請使用電腦自帶的IE瀏覽器,或者360瀏覽器、谷歌瀏覽器下載即可。
4、本站資源下載后的文檔和圖紙-無水印,預覽文檔經(jīng)過壓縮,下載后原文更清晰。
5、試題試卷類文檔,如果標題沒有明確說明有答案則都視為沒有答案,請知曉。

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

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 contains the following two XML fragments. (Line numbers are included for reference only.) 01 <script runat="server"> 02 03 </script> 04 <asp:ListView ID="ListView1" runat="server" 05 DataSourceID="SqlDataSource1" 06 07 > 08 <ItemTemplate> 09 <td> 10 <asp:Label ID="LineTotalLabel" runat="server" 11 Text='<%# Eval("LineTotal") %>' /> 12 </td> 13 </ItemTemplate> The SqlDataSource1 object retrieves the data from a Microsoft SQL Server 2005 database table. The database table has a column named LineTotal. You need to ensure that when the size of the LineTotal column value is 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 = (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. 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. 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.Black; } } 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.ForeColor = 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. <asp:Repeater ID="rptData" runat="server" DataSourceID="SqlDataSource1"ItemDataBound="rptData_ItemDataBound"> <ItemTemplate> <asp:Label ID="lblQuantity" runat="server" Text='<%# Eval("QuantityOnHand") %>' /> </ItemTemplate> </asp:Repeater> The SqlDataSource1 DataSource control retrieves the 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(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. Label 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 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" %> <html> ... <body> <form id="form1" runat="server"> <div> <asp:Label ID="lblHeader" runat="server"></asp:Label> <asp:Label ID="lbFooter" runat="server"></asp:Label> </div> </form> </body> </html> You need to dynamically add the UserCtrl.ascx control between the lblHeader and lblFooter Label controls. 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 = LoadControl("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 control 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 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. protected override 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 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 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 CreateChildControls() { 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. Template.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.Add(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 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 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. 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: QUESTION 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 = new 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 code 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 OnCheckOrderForm(EventArgs e) { CheckOrderFormEventHandler checkOrderForm = Events[CheckOrderFormKey] as CheckOrderFormEventHandler; if (checkOrderForm != null) checkOrderForm(e); } C. CheckOrderFormEventHandler checkOrderForm = new CheckOrderFormEventHandler(checkOrderFormCallBack); protected virtual void OnCheckOrderForm(EventArgs e) { if (checkOrderForm != null) checkOrderForm(e); } D. CheckOrderFormEventHandler checkOrderForm = new CheckOrderFormEventHandler(checkOrderFormCallBack); protected virtual void OnCheckOrderForm(EventArgs e) { if (checkOrderForm != null) RaiseBubbleEvent(checkOrderForm, 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 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. Which code fragment should you add to the Web page? A. <asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="TextBox1" ValidateEmptyText="True" onservervalidate="CustomValidator1_ServerValidate"> </asp:CustomValidator> <asp:CompareValidator ID="CompareValidator1" runat="server" Type="Date" EnableClientScript="true" ControlToValidate="TextBox1" Operator="DataTypeCheck" > </asp:CompareValidator> B. <asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="TextBox1" ValidateEmptyText="True" onservervalidate="CustomValidator1_ServerValidate"> </asp:CustomValidator> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"ControlToValidate="TextBox1" InitialValue="<%= DateTime.Now; %>" > </asp:RequiredFieldValidator> C. <asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="TextBox1" ValidateEmptyText="True" onservervalidate="CustomValidator1_ServerValidate"> </asp:CustomValidator> <asp:CompareValidator ID="CompareValidator1" runat="server" Type="Date" EnableClientScript="true" ControlToValidate="TextBox1" ValueToCompare="<%= DateTime.Now; %>"> </asp:CompareValidator> D. <asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="TextBox1" ValidateEmptyText="True" onservervalidate="CustomValidator1_ServerValidate"> </asp:CustomValidator> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" EnableClientScript="false" InitialValue="<%= DateTime.Now; %>" > </asp:RequiredFieldValidator> Answer: A Section: (none) Explanation/Reference: QUESTION 9 You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You derive a new validation control from the BaseValidator class. The validation 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 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(value); 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["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 XmlDataSource1 to the Web page. XmlDataSource1 is bound to an XML document with the following structure. <?xml version="1.0" encoding="utf-8" ?> <clients> <client ID="1" Name="John Evans" /> <client ID="2" Name="Mike Miller"/> ... </clients> You also write the following code segment in the code-behind 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. <asp:BulletedList ID="BulletedList1" runat="server" DisplayMode="LinkButton" DataSource="XmlDataSource1" DataTextField="Name" DataValueField="ID" onclick="BulletedList1_Click"> </asp:BulletedList> B. <asp:BulletedList ID="BulletedList1" runat="server" DisplayMode="HyperLink" DataSourceID="XmlDataSource1" DataTextField="Name" DataMember="ID" onclick="BulletedList1_Click"> </asp:BulletedList> C. <asp:BulletedList ID="BulletedList1" runat="server" DisplayMode="LinkButton" DataSourceID="XmlDataSource1" DataTextField="Name" DataValueField="ID" onclick="BulletedList1_Click"> </asp:BulletedList> D. <asp:BulletedList ID="BulletedList1" runat="server" DisplayMode="HyperLink" DataSourceID="XmlDataSource1" DataTextField="ID" DataValueField="Name" onclick="BulletedList1_Click"> </asp:BulletedList> Answer: C Section: (none) Explanation/Reference: QUESTION 11 You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You write the following code fragment. <asp:ListBox SelectionMode="Multiple" ID="ListBox1" runat="server"> </asp:ListBox> <asp:ListBox ID="ListBox2" runat="server"> </asp:ListBox> <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" /> 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 Section: (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. <asp:DropDownList AutoPostBack="true" ID="DropDownList1" runat="server" onselectedindexchanged= "DropDownList1_SelectedIndexChanged"> <asp:ListItem>1</asp:ListItem> <asp:ListItem>2</asp:ListItem> <asp:ListItem>3</asp:ListItem> </asp:DropDownList> 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 Section: (none) Explanation/Reference: ActiveViewIndex is Zero base Index. QUESTION 13 You create a Microsoft ASP.NET application 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. <asp:Calendar SelectionMode="DayWeek" ID="Calendar1" runat="server"> </asp:Calendar> You need to disable the non-week days in the Calendar control. What should 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.Date)) Calendar1.SelectedDates.Remove(e.Day.Date); } C. Add the following code segment to the Calendar1 SelectionChanged event handler. List<DateTime> list = new List<DateTime>(); foreach (DateTime st in (sender 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); } D. Add the following code segment to the Calendar1 DataBinding event handler. List<DateTime> list = new List<DateTime>(); foreach (DateTime st in (sender 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;

注意事項

本文(微軟認證考試 70-562考試復習題)為本站會員(仙***)主動上傳,裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對上載內(nèi)容本身不做任何修改或編輯。 若此文所含內(nèi)容侵犯了您的版權(quán)或隱私,請立即通知裝配圖網(wǎng)(點擊聯(lián)系客服),我們立即給予刪除!

溫馨提示:如果因為網(wǎng)速或其他原因下載失敗請重新下載,重復下載不扣分。




關于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

copyright@ 2023-2025  sobing.com 裝配圖網(wǎng)版權(quán)所有   聯(lián)系電話:18123376007

備案號:ICP2024067431-1 川公網(wǎng)安備51140202000466號


本站為文檔C2C交易模式,即用戶上傳的文檔直接被用戶下載,本站只是中間服務平臺,本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對上載內(nèi)容本身不做任何修改或編輯。若文檔所含內(nèi)容侵犯了您的版權(quán)或隱私,請立即通知裝配圖網(wǎng),我們立即給予刪除!