网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

You are creating a Web Form. You write the following code segment to create a SqlCommand object.Dim conn As SqlConnection = New SqlConnection(connString)conn.Open( )Dim cmd As SqlCommand = conn.CreateCommand( )cmd.CommandText = "select count(*) from Customers"You need to display the number of customers in the Customers table. Which two code segments can you use to achieve this goal?()

  • A、Dim customerCount As Object = cmd.ExecuteScalar()lblCompanyName.Text = customerCount.ToString()
  • B、Dim customerCount As Integer = cmd.ExecuteNonQuery()lblCompanyName.Text = customerCount.ToString()
  • C、Dim dr As SqlDataReader = cmd.ExecuteReader()dr.Read()lblCompanyName.Text = dr(0).ToString()
  • D、Dim dr As SqlDataReader = cmd.ExecuteReader()dr.Read()lblCompanyName.Text = dr.ToString()

参考答案

更多 “You are creating a Web Form. You write the following code segment to create a SqlCommand object.Dim conn As SqlConnection = New SqlConnection(connString)conn.Open( )Dim cmd As SqlCommand = conn.CreateCommand( )cmd.CommandText = "select count(*) from Customers"You need to display the number of customers in the Customers table. Which two code segments can you use to achieve this goal?()A、Dim customerCount As Object = cmd.ExecuteScalar()lblCompanyName.Text = customerCount.ToString()B、Dim customerCount As Integer = cmd.ExecuteNonQuery()lblCompanyName.Text = customerCount.ToString()C、Dim dr As SqlDataReader = cmd.ExecuteReader()dr.Read()lblCompanyName.Text = dr(0).ToString()D、Dim dr As SqlDataReader = cmd.ExecuteReader()dr.Read()lblCompanyName.Text = dr.ToString()” 相关考题
考题 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 casea users device does not display the full text of a news item.Which code segment should you use? ()A.B.C.D.

考题 You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5.  You create a folder named Dark in the App_Themes folder of the Web application. You also addfour skin files to this folder. You have to make sure that the controls on a page have their appearances overridden by the control definitions defined in the skin files. What should you do?  Which Page directive should you use?()A、You should use the page directive: %@ Page StyleSheetTheme="App_Themes.Dark"/B、You should use the page directive: %@ Page Theme="App_Themes.Dark"/C、You should use the page directive: %@ Page Theme="Dark"/D、You should use the page directive: %@ Page StyleSheetTheme="Dark"/

考题 You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5.  This application will be part of a solution that contains a Windows Communication Foundation (WCF) service project. The Web application will be used to make calls to a service identified in theWCF service project. Management is planning to host the Web application on a separate serverfrom the WCF service. They want the WCF service to perform remotely. You need to add areference to the WCF service.  What should you do?()A、You should add an assembly reference to the project.B、You should add a project reference to the project.C、You should add a Web reference to the project.D、You should add a service reference to the project.

考题 You are creating a web form with this HTML: 11. 12. 13. 14. 15. Which HTTP method is used when sending this request from the browser?()A、GETB、PUTC、POSTD、SENDE、FORM

考题 You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5.  An exception management framework is not used in the Web application. You need to ensure thatthe application log the unhandled exceptions automatically to the event log. You need to configurethe Web.config file to accomplish this. Identify the configuration that will assist you in thisscenario?()A、You should consider using the healthMonitoring enabled="true"/ configuration.B、You should consider using the deployment retail="true"/ configuration.C、You should consider using the customErrors mode="On"/ configuration.D、You should consider using the trace enabled="true"/ configuration.

考题 You are creating a templated Web control for use in your Web application. You need to add the Web control to your Web application pages without compiling your control into a .dll file. What should you do?()A、Ensure that the Web control inherits from the WebControl class.B、Ensure that the Web control inherits from the Control class.C、Ensure that the Web control inherits from the CompositeControl class.D、Ensure that the Web control inherits from the UserControl class.

考题 You create a Web Form that contains connected Web Parts. You write the following declaration in your Web Form. You need to ensure that your Web Part connection is valid. Which two actions should you perform? ()A、Include a data source identified as "WebPartConnection1" on the Web Form.B、Include a Web Part identified as "customerPart" on the Web Form.C、Include a Web Part identified as "ordersPart" on the Web Form.D、Ensure that you declare an interface named "IOrdersPart".E、Ensure that you declare an interface named "ICustomerPart".F、Ensure that each Web Part declares either a GetInterface or ProvideInterface method.

考题 You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5.  A third-party assembly contains custom server controls. This assembly does not contain a strongname and it’s not part of the application’s Microsoft Visual Studio 2008 solution. You have to makesure that the other users are able to use the custom controls. You decide to configure theapplications project.  What should you do?()A、You should add a project reference to the project.B、You should add a Web reference to the project.C、You should add a service reference to the project.D、You should add an assembly reference to the project.

考题 You create a Web Form. You need to add controls that use adaptive rendering to display content. The type of content rendered must depend on the device that is requesting the page. What are two possible ways to achieve this goal? ()A、Add custom controls that emit XHTML to the Web Form.B、Add custom controls that emit WML to the Web Form.C、Add mobile controls to the Web Form.D、Add Web server controls to the Web Form.

考题 单选题You are creating a Web Form. The Web Form allows users to rename or delete products in a list. You create a DataTable named dtProducts that is bound to a GridView. DataTable has the following four rows. dtProducts. Rows(0)("ProductName") = "Soap"dtProducts. Rows(1)("ProductName") = "Book"dtProducts. Rows(2)("ProductName") = "Computer"dtProducts. Rows(3)("ProductName") = "Spoon"dtProducts. AcceptChanges( ) The user utilizes a Web Form to delete the first product. You need to set the RowStateFilter property of the DataTables DefaultView so that only products that have not been deleted are shown. To which value should you set the DataTabless DefaultView.RowStateFilter?()A Data View Row State.Modified OriginalB Data View Row State.Modified CurrentC Data View Row State.Current RowsD Data View Row State.Added

考题 多选题You work as an ASP.NET Web Application Developer for SomeCompany. The company uses Visual Studio .NET 2010 as its application development platform.  You are creating an ASP.NET Web application using .NET Framework 4.0.  The application holds a Web page named MyHome.aspx.  You are creating a button with a rolloverimage on MyHome.aspx. However, when mouse hovered over the button image, the rolloverimage is retrieved from the server in a separate request. You need to use an improved rollover button in which the button„s rolloverimage is already downloaded and stored in the browser’s cache, as a result when you hover over the button, it is instantly displayed. What will you do to accomplish this?()AUse JavaScript Object Notation.BUse the RegisterClientScriptBlock method.CUse the RegisterClientScriptlnclude method.DBuild a JavaScript function.EUse the RegisterClientScriptResource method.

考题 单选题You install the Web Server (IIS) role on a new server that runs Windows Server 2008.  You install a Microsoft .NET Framework 1.0 application on a Web site on the Web server. The company security policy states that all applications must run by using the minimum level of permission.  You need to configure the Web site application so that it has the permissions to execute without creating any other content and without accessing any operating system components. What should you do?()A Set the .NET Framework trust level to Full for the Web site.B Set the .NET Framework trust level to Low for the Web site.C Set the .NET Framework trust level to High for the Web site.D Set the .NET Framework trust level to Medium for the Web site.

考题 单选题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 AnonymousB CertificateC FormsD Microsoft Windows Integrated Security

考题 单选题You create a Web Form that contains a text box named txtDate. You want the text box to allow users to enter any valid date. You need to use an ASP.NET validation control to ensure that only valid date values are submitted to the server. What should you do?()A Add a CompareValidator control to the Web Form. Set its ControlToValidate property to txtDate. Set its Type property to Date. Set its Operator property to DataTypeCheck.B Add a RangeValidator control to the Web Form. Set its ControlToValidate property to txtDate. Set its Type property to Date. Set its MinimumValue property to 01/01/1900 and its MaximumValue to the current date.C Add a CustomValidator control to the Web Form. Set its ControlToValidate property to txtDate. Write a function in the partial class that verifies the values as dates and returns a Boolean variable. Set the CustomValidators ClientValidationFunction to the name of your function.D Add a RegularExpressionValidator control to the Web Form. Set its ControlToValidate property to txtDate. Set the ValidationExpression property to ensure that the users input follows the format of nn-nn-nnnn, where n represents a number from 0 through 9.

考题 单选题You are creating a Web Form. The Web Form allows users to rename or delete products in a list. You create a DataTable named dtProducts that is bound to a GridView. DataTable has the following four rows. dtProducts. Rows[0]["ProductName"] = “Soap”;dtProducts. Rows[1][“ProductName”]= “Book”;dtProducts. Rows[2][“ProductName”]= “Computer”;dtProducts. Rows[3][“ProductName”]= “Spoon”;dtProducts. AcceptChanges( ); The user utilizes a Web Form to delete the first product. You need to set the RowStateFilter property of the DataTables DefaultView so that only products that have not been deleted are shown. To which value should you set the DataTabless DefaultView.RowStateFilter? ()A Data V iewRowState.ModifiedOriginal;B Data V iewRowState.ModifiedCurrent;C Data V iewRowState.CurrentRows;D Data V iewRowState.Added;

考题 单选题You are creating a web form with this HTML: 11. 12. 13. 14. 15. Which HTTP method is used when sending this request from the browser?()A GETB PUTC POSTD SENDE FORM

考题 单选题You are creating a Windows Forms application by using the .Net Framework 3.5.You plan to display detailed help instructions for each control in the form.You create a help file.You configure a HelpProvider component on the form. You need to display the help file for the control that is focused when the F1 key is pressed.Which method of the HelpProvider class should you call for each control?()A SetShowHelpB SetHelpStringC SetHelpKeywordD SetHelpNavigator