2013年微软认证:微软认证70-562考试精选模拟试题(1)

牛课网 考试宝典 更新时间:2024-05-04 12:30:58 浏览数:

热门推荐:

2013年微软认证:微软认证70-562考试精选模拟试题(1)

微软考试是随报随考,在复习的过程中中还是不够全面,为了帮助广大考生系统全面的复习好《微软认证学科》,我们考吧网整理了微软认证模拟试题,本次汇编的模拟试题希望对你的考试有所帮助,预祝你考试顺利。

编辑推荐:2013年微软认证:微软认证考试必备经典试题汇总三

1.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.

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

2.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

04

05 DataSourceID="SqlDataSource1"

06

07 >

08

09

10

11 Text='' />

12

13

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

上一篇:2013年微软认证:微软认证flash考试精选试题(十一)

考试宝典安装说明

宝典适用于手机、电脑、平板,您可安装客户端或在浏览器使用。

电脑版

手机版

网页版

考试宝典咨询
服务热线

TEL:029-88699698