多项选择题You create a Web Form. The Web Form allows users to log on to a Web site. You implement the login logic using a Login control named Login1. The membership data for the application is stored in a SQL Express database in the App_Data directory. You need to configure your application so that the membership data is stored in a local Microsoft SQL Server database. You add the following code segment to the Web.config file. Which two additional actions should you perform? ()

A. Use Aspnet_regsql.exe to create the Microsoft SQL Server database.
B. Set Login1's MembershipProvider property to MySqlProviderConnection.
C. Add the following code segment to the Web.config file. <connectionStrings> <add name="MySqlProviderConnection" connectionString="valid connection string" /></connectionStrings>
D. Add the following code segment to the Web.config file. <appSettings><add key="MySqlProviderConnection" value="valid connection string" /></appSettings>
E. In the ASP.NET configuration settings within IIS, ensure that Role Management Enabled is selected.
F. Use the Web Site Administration Tool to select AspNetSqlMembershipProvider as the membership provider for your application.


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题You create a Web application to process XML documents. The Web application receives XML document files from several sources, reads them, and stores them in a Microsoft SQL Server database. The Web application parses all incoming data files to ensure that they conform to an XML schema. You need to find all validation errors in the XML document. What should you do? ()

A. Load the XML data by using an instance of the XmlDocument class and specify a location for the application schema.
B. Configure the ValidationEventHandler in the XmlReaderSettings of the XmlReader object.
C. Read the XML file into a DataSet object and set the EnforceConstraints property to True.
D. Read the XML file into a DataSet object. Handle the DataSet.MergeFailed event to parse the data that does not conform to the XML schema.

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

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

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

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

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

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

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

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

10.单项选择题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 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?()

题型:单项选择题

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?()

题型:多项选择题

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?()

题型:单项选择题

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 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? ()

题型:多项选择题

You have a Web application that is configured for personalization. You need to access personalization data from one of the pages of the Web application by using the minimum amount of administrative effort.What should you do? ()

题型:单项选择题

You create a Web site. You add an EditorZone control to the home page on the Web site. You need to enable users to customize the size and location of the Web Parts on their home pages.Which two controls should you add to the EditorZone control?()

题型:多项选择题

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 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 create a Web application for your company's intranet. You want to enable users to customize their versions of the intranet home page. You create sections of content as Web Parts. You need to ensure that users can customize content at any time.Which two code segments should you use?()

题型:多项选择题