单项选择题
You are implementing an ASP.NET page. You add and configure the following ObjectDataSource.
The page will be called with a query string field named pid. You need to configure the ObjectDataSource control to pass the value of the pid field to GetProductsByProductId method. What should you do? ()
A.Replace the asp:QueryStringParameter with the following declaration.
B.Replace the asp:QueryStringParameter with the following declaration.
C.Add the following event handler to the Selecting event of the ObjectDataSource control.
D.Add the following code segment to the page’s code-behind.
相关考题
-
单项选择题
YouareimplementinganASP.NETpage.ThepageincludesamethodnamedGetCustomerOrderDataSetthatreturnsaDataSet.TheDataSetincludesaDataTablenamedCustomerDetailsTableandaDataTablenamedOrderDetailsTable.YouneedtodisplaythedatainOrderDetailsTableinaDetailsViewcontrolnameddtlView.Whichcodesegmentshouldyouuse?()
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
