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

牛课网 考试宝典 更新时间:2024-05-03 06:28:18 浏览数:

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

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

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

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

...

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

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

You write the following code segment in the code-behind file to create a Web form. (Line numbers are included for reference only.)

01 string strQuery = "select * from Products;"

02 + "select * from Categories";

03 SqlCommand cmd = new SqlCommand(strQuery, cnn);

04 cnn.Open();

05 SqlDataReader rdr = cmd.ExecuteReader();

06

07 rdr.Close();

08 cnn.Close();

You need to ensure that the gvProducts and gvCategories GridView controls display the data that is contained in the following two database tables:

The Products database tabl The Categories database tabl Which code segment should you insert at line 06?

A.

gvProducts.DataSource = rdr;

gvProducts.DataBind();

gvCategories.DataSource = rdr;

gvCategories.DataBind();

B.

gvProducts.DataSource = rdr;

gvCategories.DataSource = rdr;

gvProducts.DataBind();

gvCategories.DataBind();

C.

gvProducts.DataSource = rdr;

rdr.NextResult();

gvCategories.DataSource = rdr;

gvProducts.DataBind();

gvCategories.DataBind();

D.

gvProducts.DataSource = rdr;

gvCategories.DataSource = rdr;

gvProducts.DataBind();

rdr.NextResult();

gvCategories.DataBind();

Answer: D

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

考试宝典安装说明

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

电脑版

手机版

网页版

考试宝典咨询
服务热线

TEL:029-88699698