单项选择题
You are implementing an ASP.NET page. The page includes a method named GetCustomerOrderDataSet that returns a DataSet. The DataSet includes a DataTable named CustomerDetailsTable and a DataTable named OrderDetailsTable. You need to display the data in OrderDetailsTable in a DetailsView control named dtlView. Which code segment should you use?()
A. dtlView.DataSource = GetCustomerOrderDataSet(); dtlView.DataMember = "OrderDetailsTable"; dtlView.DataBind();
B.dtlView.DataSource = GetCustomerOrderDataSet(); dtlView.DataSourceID = "OrderDetailsTable"; dtlView.DataBind();
C.dtlView.DataSource = GetCustomerOrderDataSet(); dtlView.DataKeyNames = new string [] { "OrderDetailsTable"}; dtlView.DataBind();
D.DataSet dataSet = GetCustomerOrderDataSet(); dtlView.DataSource = new DataTable("dataSet", "OrderDetailsTable"); dtlView.DataBind();
相关考题
-
单项选择题
YoudeployanASP.NETapplicationtoanIISserver.Youneedtologhealth-monitoringeventswithseverityleveloferrortotheWindowsapplicationeventlog.Whatshouldyoudo?()
A.Run the aspnet_regiis.exe command.
B.Set the Treat warnings as errors option to All in the project properties and recompile.
C.Add the following rule to thesection of the web.config file.
D.Add the following rule to thesection of the web.config file. -
多项选择题
YoucreateaVisualStudio2010solutionthatincludesaWCFserviceprojectandanASP.NETproject.TheserviceincludesamethodnamedGetPeoplethattakesnoargumentsandreturnsanarrayofPersonobjects.TheASP.NETapplicationusesaproxyclasstoaccesstheservice.YouusetheAddServiceReferencewizardtogeneratetheclass.Afteryoucreatetheproxy,youmovetheserviceendpointtoadifferentport.Youneedtoconfiguretheclienttousethenewserviceaddress.Inaddition,youmustchangetheimplementationsothatcallstotheclientproxywillreturnaListinsteadofanarray.Whichtwoactionsshouldyouperform?()
A.In the context menu for the service reference in the ASP.NET project, select the Configure Service Reference commSystem.Collections.Generic.List
B.In the context menu for the service reference in the ASP.NET project, select the Update Service Reference comma
C.Change the service interface and implementation to return a List
D.Edit the address property of the endpoint element in the web.config file to use the new service address -
单项选择题
YouareimplementinganASP.NETWebsite.Thesiteusesacomponentthatmustbedynamicallyconfiguredbeforeitcanbeusedwithinsitepages.YoucreateastaticmethodnamedSiteHelper.Configurethatconfiguresthecomponent.YouneedtoaddacodesegmenttotheGlobal.asaxfilethatinvokestheSiteHelper.Configuremethodthefirsttime,andonlythefirsttime,thatanypageinthesiteisrequested.Whichcodesegmentshouldyouuse?()
A.void Application_Start(object sender, EventArgs e) { SiteHelper.Configure(); }
B.void Application_Init(object sender, EventArgs e) { SiteHelper.Configure(); }
C.void Application_BeginRequest(object sender, EventArgs e) { SiteHelper.Configure(); }
D.Object lockObject = new Object(); void Application_BeginRequest(object sender, EventArgs e) { lock(lockObject()) { SiteHelper.Configure(); } }
