多项选择题Your Web site processes book orders. One of the application methods contains the following code segment.Dim doc As New XmlDocument()doc.LoadXml("10" &_"Dictionary")You need to remove the discount element from XmlDocument. Which two code segments can you use to achieve this goal? ()

A. Dim root As XmlNode = doc.DocumentElementroot.RemoveChild(root.FirstChild)
B. Dim root As XmlNode = doc.DocumentElementroot.RemoveChild(root.SelectSingleNode("discount"))
C. doc.RemoveChild(doc.FirstChild)
D. doc.DocumentElement.RemoveChild(doc.FirstChild)


您可能感兴趣的试卷

你可能感兴趣的试题

1.多项选择题You load an XmlDocument named doc with the following XML. Dictionary World Atlas You need to change the value for the genre attribute to NA for all book attributes. First, you add the following code segment to your class.Dim root As XmlElement = doc.DocumentElementDim nodes As XmlNodeList = root.SelectNodes("books/book")Which additional two code segments can you use to achieve this goal?()

A. Dim node As XmlNodeFor Each node In nodes node.Attributes(0).Value = "NA"Next node
B. Dim node As XmlNodeFor Each node In nodes node.Attributes(1).Value = "NA"Next node
C. Dim node As XmlNodeFor Each node In nodes Dim genre As XmlNode = node.SelectSingleNode("/genre") genre.Value = "NA"Next node
D. Dim node As XmlNodeFor Each node In nodes Dim genre As XmlNode = node.SelectSingleNode("@genre") genre.Value = "NA"Next node
E. Dim node As XmlNodeFor Each node In nodes Dim genre As XmlNode = node.SelectSingleNode("genre") genre.Value = "NA"Next node

2.多项选择题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()

3.多项选择题You create a Web Form that contains a TreeView control. The TreeView control allows users to navigate within the Marketing section of your Web site. The following XML defines the site map for your site. You need to bind the TreeView control to the site map data so that users can navigate only within the Marketing section. Which three actions should you perform?()

A. Add a SiteMapDataSource control to the Web Form and bind the TreeView control to it.
B. Add a SiteMapPath control to the Web Form and bind the TreeView control to it.
C. Embed the site map XML within the SiteMap node of a Web.sitemap file.
D. Embed the site map XML within the AppSettings node of a Web.config file.
E. Set the StartingNodeUrl property of the SiteMapDataSource control to ~/Marketing.aspx.
F. Set the SkipLinkText property of the SiteMapPath control to Sales.

4.单项选择题You are transferring records from one database to another. You need to decide whether you can use the SqlBulkCopy class to transfer the records. What should you do? ()

A. Ensure that the source database is Microsoft SQL Server.
B. Ensure that the destination database is Microsoft SQL Server.
C. Ensure that the column names in the source table match the column names in the destination table.
D. Ensure that the bulk copy program (bcp) utility is installed on the destination server.

5.多项选择题You create a server control that inherits from WebControl. You need to enable the server control to emit markup for a new kind of mobile device. You must not alter the code in the server controls. Which two actions should you perform?()

A. Create a class that inherits HtmlTextWriter and that can emit the new markup.
B. Create a class that inherits StreamWriter and that can emit the new markup.
C. Reference the class in the <capabilities> element of the new device's browser definition file.
D. Reference the class in the <controlAdapters> element of the new device's browser definition file.

6.多项选择题You create a mobile Web application. You need to use a Command control to post user input from the UI elements back to the server. What are two possible ways to achieve this goal?()

A. Place the Command control within an instance of the System.Web.UI.MobileControls.SelectionList control.
B. Place the Command control within an instance of the System.Web.UI.MobileControls.ObjectList control.
C. Place the Command control within an instance of the System.Web.UI.MobileControls.Form control.
D. Place the Command control within an instance of the System.Web.UI.MobileControls.Panel control.

7.多项选择题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.

8.单项选择题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.

10.单项选择题You develop a Web application. Your application contains two settings in the Web.config file. You deploy your application to production. You need to modify the application settings in the production environment without manually editing the XML markup in the Web.config file. What should you do? ()

A. Modify the application settings by using the Web Site Administration Tool.
B. Modify the application settings by using the Visual Studio property page editor for the project.
C. Modify the application settings by using the resource editor.
D. Modify the application settings by using the Visual Studio start options editor.

最新试题

You are developing a page named Products.aspx in a Web application that contains three DropDownList controls that are dynamically loaded from a SQL Server 2005 database file. The DropDownList controls represent a vendor list, a certification list, and an exam list. Certkiller .com customers use the Products.aspx page to select exams related to particular certifications on offer from a particular vendor. A Go button initiates the selection. Each DropDownList control has an associated RequiredFieldValidator control.Whenever the customer selects a vendor, and the vendor offers certifications, then the customer must also select a certification if the. If the vendor only offers exams and not certifications, the certification list should remain hidden. Whenever the customer selects a certification, the customer must also select an exam. Validation error messages should only be displayed when the Go button is clicked. You need to set properties on the vendor DropDownList control.What should you do?()

题型:单项选择题

Certkiller .com's e-Commerce Web application contains a page named Products.aspx that uses data source and data-bound server controls. Customers use the server controls to search for products. The Products.aspx page does not have an associated code-behind file. You need to convert the Products.aspx page to a user control so that its functionality can be reused on other pages.What should you do?()

题型:多项选择题

You want to enable users of a Web application to modify the Web application's UI and behavior. These modifications must be maintained at the user level so that when users return to the Web application, the changes are still in effect. You need to achieve this goal by using the minimum amount of custom code.What should you do?()

题型:单项选择题

You create a Web Form. The Web Form allows users to calculate values and display the results in a label named lblResults. You need to capture all unhandled exceptions on the Web Form through the Error event. The Error event must capture each unhandled exception and display it on the Web Form.Which code segment should you use?()

题型:单项选择题

You create a Web Form. The Web Form uses the FormView control to enable a user to edit a record in the database. When the user clicks the Update button on the FormView control, the application must validate that the user has entered data in all of the fields. You need to ensure that the Web Form does not update if the user has not entered data in all of the fields.Which code segment should you use?()

题型:单项选择题

You are developing a page named Process.aspx in a shopping cart Web application that will be integrated into Certkiller .com's existing e-Commerce Web site. The Process.aspx page allows customers to pay for purchases using their credit cards. The Process.aspx page contains a Button control that confirms the customer's payment and calls an external Web service that charges the customer's credit card. You must implement confirmation and prevent postback unless the customer confirms payment.What should you do?()

题型:单项选择题

You create an intranet Web site for management of project documents. You need to enable all users to browse documents on the site. Only members of the administrators group must be ble to upload files.Which code segment of the Web.config file should you use?()

题型:单项选择题

You are developing a Web application. Your code restricts access to some pages based on the users credentials. You need to configure IIS to supply the user's Windows credentials to your Web application. These credentials must be encrypted.What should you do? ()

题型:单项选择题

You create a mobile Web application. You need to use a Command control to post user input from the UI elements back to the server.What are two possible ways to achieve this goal?()

题型:多项选择题

You create a Web application. The Web application enables users to change fields in their personal profiles. Some of the changes are not persisting in the database. You need to raise a custom event to track each change that is made to a user profile so that you can locate the error.Which event should you use? ()

题型:单项选择题