多项选择题

You are creating a custom user control. The custom user control will be used on 10 Web Forms for an ASP.NET Web site that allows users to register and log on to a personalized experience. The custom user control uses two TextBox controls and two Button controls. You need to ensure that the controls are visible only when users are not logged on to the Web site. You also need to minimize the amount of effort in development and maintenance for the Web site.
Which two actions should you perform? ()

A. Add the OnClick event handler for the Login button to the code used in the custom user control.
B. Add the OnClick event handler for the Login button to the code used in the Web Form where the control is added.
C. In the Page_Load method of the Web Form, add a code segment to set the visibility of the TextBox and Button controls where the control is added.
D. In the Page_Load method of the custom user control, add a code segment to set the visibility of the TextBox and Button controls.


您可能感兴趣的试卷

你可能感兴趣的试题

1.多项选择题

You are creating a custom user control. The custom user control will be used on 10 Web Forms for an ASP.NET Web site that allows users to register and log on to a personalized experience.The custom user control uses two TextBox controls and two Button controls.You need to ensure that the controls are visible only when users are not logged on to the Web site. You also need to minimize the amount of effort in development and maintenance for the Web site.
Which two actions should you perform?()

A. Add the OnClick event handler for the Login button to the code used in the custom user control.
B. Add the OnClick event handler for the Login button to the code used in the Web Form where the control is added.
C. In the Page_Load method of the Web Form, add a code segment to set the visibility of the TextBox and Button controls where the control is added.
D. In the Page_Load method of the custom user control, add a code segment to set the visibility of the TextBox and Button controls.

2.单项选择题

You create an application. The application processes hundreds of XML documents per minute. The XML documents are validated against inline schemas.You need to load XML documents from the file system and read them as quickly as possible. XML comments must be ignored while reading the XML documents.
What should you do?()

A. Create an instance of the XmlReader class by using the XmlReader Create method with an instance of the XmlReaderSettings class.
B. Create an instance of the XmlReader class with an instance of the XmlTextReader class.
C. Create an instance of the XmlDocument class and specify a location for the application schema.
D. Create an instance of the XmlReader class with an instance of the XmlNodeReader class.

3.单项选择题

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.

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 are developing an application that connects to a Microsoft SQL Server database using the SqlConnection object. Your connection objects are being pooled. As the pool fills up, connection requests are queued. Some connection requests are rejected. You need to ensure that the application releases connections back to the pool as soon as possible. Also, you need to decrease the likelihood that connection requests will be rejected.

Which three actions should you perform?()


A. Ensure that the Close method is called on each connection object after it has finished executing.
B. Ensure that each connection object is left open after it has finished executing.
C. Increase the Max Pool Size value inside the connection string.
D. Increase the Min Pool Size value inside the connection string.
E. Increase the Connection Lifetime value inside the connection string.
F. Increase the value of the ConnectionTimeout property of the SqlConnection object.


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

7.单项选择题

You create a Web Form that contains a button named btnCancel that enables users to exit the page. When users click this button, validation must not occur. During testing you learn that clicking the Cancel button does not enable users to exit the page. You need to ensure that users can always exit the page.
What should you do?()

A. Set the Enabled property of the validation controls on the Web Form to False.
B. Set the CausesValidation property of the btnCancel button to False.
C. Set the CausesValidation property of the btnCancel button to True.
D. Set the Visible property of the validation controls on the Web Form to False.

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 Custom Validators 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.

9.单项选择题

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 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 product search page named Search.aspx for Web application that will be integrated into Certkiller .com's existing e-Commerce Web site. The Search.aspx page allows customers search for products that match specific criteria. Once a product is located, you want an image of the product to be displayed. You want to use an Image control to display the image. You want to configure the Image control to display a description of the image if the image cannot be displayed in the customer's Web browser.What should you do?()

题型:单项选择题

You recently developed a Web application that accesses an external Web service to retrieve current exchange rates for Certkiller .com's e-Commerce Web site. The Web service converts USD prices to the customer's local currency. You have stored the URL to the external Web service's endpoint in the section of the Web.config file. The Web application has been successfully deployed to a Certkiller .com Web server named Certkiller -SR14. A few months later the vendor of the Web service changes the port that is used to access the Web service. You need to update the section of the Web application's Web.config file from Certkiller -WS528. You need to ensure that your solution has a minimal impact on customers that may be connected to the e-Commerce Web site.What should you do?()

题型:单项选择题

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

题型:多项选择题

You need to turn on Tracing for a page that is not performing well. You must store the trace information in a database for reporting and trending.Which two actions should you perform?()

题型:多项选择题

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

题型:单项选择题

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

题型:多项选择题