2013年微软认证考试精选试题4

牛课网 考试宝典 更新时间:2024-06-15 04:01:57

我们考吧网为了帮助考生朋友们加强基础知识的巩固,加强练习试题的训练,有效的提高学习效率,我们考吧网整理了一些关于微软认证模拟试题,希望对本次的考试有所帮助,汇编的模拟试题如下:同时也希望你本次顺利通关。想了解更多职称计算机咨询,就请继续关注我们考吧网。

1.You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.

2013年微软认证考试精选试题4

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);

答案: B

2.You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.

You create a custom Web user control named SharedControl. The control will be compiled as a library.

You write the following code segment for the SharedControl control. (Line numbers are included for reference only.)

01 protected override void OnInit(EventArgs e)

02 {

03 base.OnInit(e);

04

05 }

All the master pages in the ASP.NET application contain the following directive.

You need to ensure that the state of the SharedControl control can persist on the pages that reference a master page.

Which code segment should you insert at line 04?

A.Page.RegisterRequiresPostBack(this);

B.Page.RegisterRequiresControlState(this);

C.Page.UnregisterRequiresControlState(this);

D.Page.RegisterStartupScript("SharedControl","server");

答案: B

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

02

03

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?

.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; }

}

答案: A

编辑推荐:

2013年微软认证考前模拟精选试题汇总二

2013年微软认证考试精选试题汇总三

考试宝典安装说明

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

电脑版

手机版

网页版

考试宝典咨询
服务热线

TEL:029-88699698