题目内容 (请给出正确答案)
[主观题]

You are creating a DataTable. You use the following code segment to create the DataTable.

(Line numbers are included for reference only.)01 Dim dt As New DataTable("Products")02 dt.Columns.Add(New DataColumn("Price", _ GetType(Decimal)))03 dt.Columns.Add(New DataColumn("Quantity", _ GetType(Int32)))04 Dim dc As DataColumn = New DataColumn("Total", _ GetType(Decimal))05 dt.Columns.Add(dc)You need to ensure that the Total column is set to the value of the Price column multiplied by the Quantity column when new rows are added or changed. What should you do? ()

A. Add the following code segment after line 05. dc.ExtendedProperties("Total") = "Price * Quantity"

B. Add the following code segment after line 05. dc.Expression = "Price * Quantity"

C. Write an event handler for the DataTable‘s TableNewRow event that updates the row‘s Total.

D. Write an event handler for the DataTable‘s ColumnChanged event that updates the row‘s Total.

查看答案
如搜索结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能会需要:
您的账号:
发送账号密码至手机
发送
更多“You are creating a DataTable. …”相关的问题

第1题

You are creating a DataTable. You use the following code segment to create the DataTable. (Line numbers are included for reference only.)01 DataTable dt = new DataTable(Products”);02 dt.Columns.Add(new DataColumn(Price”, typeof(decimal)));03 dt.Columns.Add(new DataColumn(Quantity”, typeof(Int32)));04 DataColumn dc = new DataColumn(Total”, typeof(decimal));05 dt.Columns.Add(dc);You need to ensure that the Total column is set to the value of the Price column multiplied by the Quantity column when new rows are added or changed. What should you do? ()

A. Add the following code segment after line 05. dc.ExtendedProperties["Total"] = "Price * Quantity”;

B. Add the following code segment after line 05. dc.Expression = “Prince * Quantity”;

C. Write an event handler for the DataTable‘s TableNewRow event that updates the row‘s Total.

D. Write an event handler for the DataTable‘s ColumnChanged event that updates the row‘s Total.

点击查看答案

第2题

You are creating a custom control. The UI of the control must contain several text boxes and two buttons. The control must be available in the global assembly cache for reuse across multiple Web applications. You need to achieve this functionality by using the minimum amount of code. What should you do? ()

A. Create a control that derives from System.Web.UI.Control.

B. Create a control that derives from System.Web.UI.WebControls.CompositeControl.

C. Create a control that derives from System.Web.UI.WebControls.WebControl.

D. Create a control that derives from System.Web.UI.UserControl.

点击查看答案

第3题

YouareemployedasasystemadministratoratCertkiller.com.YouareintheprocessofcreatinganASP.NETapplicationusingMicrosoft.NETFrameworkv3.5.

YoudecidetocreateaJavaScriptfilenamedDataScript.js.Thefollowingcodesegmentwaswrittentocreatethisfile:

TheDataScript.jsfileisinsertedasaresourceinaClassLibraryproject.ThenamespaceforthisprojectisData.Resources.TheJavaScriptMessagesobjectisusedbytheJavaScriptfunctioninordertoretrievemessagesfromaresourcefile.Thisresourcefileisnamed

TestMsgResources.resx.IntheASP.NETapplicationyouaddanAJAXWebformaswellas

referencingtheClassLibrary.ThereafteranASP.NETAJAXScriptReferenceelementisaddedtotheAJAXWebform.

YoureceiveaninstructionfrommanagementtomakesurethattheJavaScriptfunctionisabletoaccesstheerrormessagesdefinedintheresourcefile.YoushouldthusdeterminetheappropriatecodesegmentthatshouldbeaddedtotheAssemblyInfo.vbfile.

Whatshouldyoudo?()

点击查看答案

第4题

YouarecreatingaWindowsCommunicationFoundation&8
YouarecreatingaWindowsCommunicationFoundation(WCF)servicetoprocessorders.Thedatacontractfortheorderisdefinedasfollows.[DataContract]publicclassOrder{[DataMember]publicstringCardHolderName{get;set;[DataMember]publicstringCreditCardNumber{get;set;}}Youhavethefollowingrequirements:"EnablethetransmissionofthecontentsofOrderfromtheclientstotheservice."EnsurethatthecontentsofCreditCardNumberarenotsentacrossthenetworkincleartext."EnsurethatthecontentsofCreditCardNumberareaccessiblebytheservicetoprocesstheorder.Youneedtoimplementtheservicetomeettheserequirements.Whatshouldyoudo?()Forinteractiveandself-pacedpreparationofexam70-513,tryourpracticeexams.Practiceexamsalsoincludeselfassessmentandreportingfeatures!
点击查看答案

第5题

Youarecreatingaclassthatperformscomplexfinancialcalculations.TheclasscontainsamethodnamedGetCurrentRatethatretrievesthecurrentinterestrateandavariablenamedcurrRatethatstoresthecurrentinterestrate.Youwriteserializedrepresentationsoftheclass.YouneedtowriteacodesegmentthatupdatesthecurrRatevariablewiththecurrentinterestratewhenaninstanceoftheclassisdeserialized.Whichcodesegmentshouldyouuse?()

A.A

B.B

C.C

D.D

点击查看答案

第6题

You are creating a mobile Web Form that dynamically displays news items. You want to display news items by using an instance of a mobile TextView control named TextViewNews. You need to configure the Web Form that contains TextViewNews. The Web Form must enable pagination in case a users device does not display the full text of a news item. Which code segment should you use? ()

A. PagerStyle ps = new PagerStyle();ps.NextPageText = “more>”;ps.PreviousPageText = “<back”;FormNews.Paginate = true;

B. FormNews.PagerStyle.NextPageText = “more >”;FormNews.PagerStyle.PreviousPageText = “< back”;TextViewNews.PaginateRecursive(new ControlPager(FormNews, 1000));

C. FormNews.PagerStyle.NextPageText = “more >”;FormNews.PagerStyle.PreviousPageText = “< back”;FormNews.PaginateRecursive(new ControlPager(FormNews, 1000));

D. FormNews.PagerStyle.NextPageText = “more >”;FormNews.PagerStyle.PreviousPageText = “< back”;FormNews.Paginate = true;

点击查看答案

第7题

You are creating a mobile Web Form that dynamically displays news items. You want to display news items by using an instance of a mobile TextView control named TextViewNews. You need to configure the Web Form that contains TextViewNews. The Web Form must enable pagination in case a users device does not display the full text of a news item. Which code segment should you use? ()

A. Dim ps As PagerStyle = New PagerStyle()ps.NextPageText = "more >"ps.PreviousPageText = "< back"FormNews.Paginate = True

B. FormNews.PagerStyle.NextPageText = "more >"FormNews.PagerStyle.PreviousPageText = "< back"TextViewNews.PaginateRecursive(New ControlPager(FormNews, 1000))

C. FormNews.PagerStyle.NextPageText = "more >"FormNews.PagerStyle.PreviousPageText = "< back"FormNews.PaginateRecursive(New ControlPager(FormNews, 1000))

D. FormNews.PagerStyle.NextPageText = "more >"FormNews.PagerStyle.PreviousPageText = "< back"FormNews.Paginate = True

点击查看答案

第8题

You are creating a custom user control. The custom user control will be used on 10 Web Forms for an ASP.NET Web site that allows users to register and log on to a personalized experience.The custom user control uses two TextBox controls and two Button controls.You need to ensure that the controls are visible only when users are not logged on to the Web site. You also need to minimize the amount of effort in development and maintenance for the Web site.Which two actions should you perform?()

A. Add the OnClick event handler for the Login button to the code used in the custom user control.

B. Add the OnClick event handler for the Login button to the code used in the Web Form where the control is added.

C. In the Page_Load method of the Web Form, add a code segment to set the visibility of the TextBox and Button controls where the control is added.

D. In the Page_Load method of the custom user control, add a code segment to set the visibility of the TextBox and Button controls.

点击查看答案

第9题

YouarecreatingaWindowsFormsapplicationby&
YouarecreatingaWindowsFormsapplicationbyusingthe.NETFramework3.5.Youcreateanewformintheapplication.YouaddaContextMenuStripcontrolnameddctxMenutotheform.YouhaveauserdefinedclassnamedCustomControl.Youwritethefollowingcodesegmentintheapplication(Linenumbersareincludedforreferenceonly)

CustomControlmyControl=newCustomControl();

YouneedtoensurethataninstanceofCustomControlisdisplayedontheformasatoplevelitemofthectxMenucontrol.

Whichcodesegmentshouldyouadd?()

点击查看答案

第10题

You are creating a Web application that will run on an intranet. The Web application reads comma-delimited text files. The text files reside in a subdirectory below the Web application‘s root directory. Users must not be able to navigate directly to these files in a Web browser unless they are members of the Accounting role. You need to write an ASP.NET HTTP handler that will use the FileAuthorizationModule class.Which form of authentication should you use?()

A. Anonymous

B. Certificate

C. Forms

D. Microsoft Windows Integrated Security

点击查看答案
热门考试 全部 >
相关试卷 全部 >
账号:
你好,尊敬的上学吧用户
发送账号至手机
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
谢谢您的反馈

您认为本题答案有误,我们将认真、仔细核查,
如果您知道正确答案,欢迎您来纠错

警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
上学吧
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反上学吧购买须知被冻结。您可在“上学吧”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
上学吧
点击打开微信