单项选择题You develop a Web control. The Web control consists of labels and associated text boxes. You need to ensure that the Web control has both toolbox and visual designer support. What should you do?()

A. Add a Web Control Library project to your solution. Define a class that inherits from CompositeControl.
B. Add a Windows Control Library project to your solution. Define a class that inherits from UserControl.
C. Add a Web User Control to your project. Define a class that inherits from UserControl.
D. Add a Mobile Web User Control to your project. Define a class that inherits from MobileUserControl..


您可能感兴趣的试卷

你可能感兴趣的试题

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 are creating a DataTable. You use the following code segment to create the DataTable. (Line numbers are included for reference only.)
01 Dim dt As New DataTable("Products")
02 dt.Columns.Add(New DataColumn("Price", _ GetType(Decimal)))
03 dt.Columns.Add(New DataColumn("Quantity", _ GetType(Int32)))
04 Dim dc As DataColumn = New DataColumn("Total", _ GetType(Decimal))
05 dt.Columns.Add(dc)
You need to ensure that the Total column is set to the value of the Price column multiplied by the Quantity column when new rows are added or changed. What should you do? ()

A. Add the following code segment after line 05. dc.ExtendedProperties("Total") = "Price * Quantity"
B. Add the following code segment after line 05. dc.Expression = "Price * Quantity"
C. Write an event handler for the DataTable's TableNewRow event that updates the row's Total.
D. Write an event handler for the DataTable's ColumnChanged event that updates the row's Total.

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

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

8.单项选择题You have an SQL query that takes one minute to execute. You use the following code segment to execute the SQL query asynchronously.Dim ar As IAsyncResult = cmd.BeginExecuteReader()You need to execute a method named DoWork() that takes one second to run while the SQL query is executing. DoWork() must run as many times as possible while the SQL query is executing. Which code segment should you use?()

A. While ar.AsyncWaitHandle Is Nothing DoWork()End Whiledr = cmd.EndExecuteReader(ar)
B. While Not ar.IsCompleted DoWork()End Whiledr = cmd.EndExecuteReader(ar)
C. While T hread.CurrentThread.ThreadState = ThreadState.Running DoWork()End Whiledr = cmd.EndExecuteReader(ar)
D. While Not ar.AsyncWaitHandle.WaitOne() DoWork()End Whiledr = cmd.EndExecuteReader(ar)

9.单项选择题You load an XmlDocument named doc with the following XML. World Atlas Dictionary You need to use an XPath query string to select the two book nodes. Which code segment should you use? ()

A. Dim root As XmlElement = doc.DocumentElementDim nodes As XmlNodeList = root.SelectNodes(".")
B. Dim root As XmlElement = doc.DocumentElementDim nodes As XmlNodeList = root.SelectNodes("book")
C. Dim root As XmlElement = doc.DocumentElementDim nodes As XmlNodeList = root.SelectNodes("bookstore//book")
D. Dim root As XmlElement = doc.DocumentElementDim nodes As XmlNodeList = root.SelectNodes("books/book")

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

A. Protected Sub FormView1_ItemUpdating(ByVal sender As Object, _ ByVal e As System.Web.UI.WebControls.FormViewUpdateEventArgs) _ Handles FormView1.ItemUpdating Dim entry As DictionaryEntry For Each entry In e.Keys If entry.Value.ToString() = System.String.Empty Then e.Cancel = True Return End If Next entryEnd Sub
B. Protected Sub FormView1_ItemUpdated(ByVal sender As Object, _ ByVal e As System.Web.UI.WebControls.FormViewUpdatedEventArgs) _ Handles FormView1.ItemUpdated Dim entry As DictionaryEntry For Each entry In e.NewValues If entry.Value.Equals("") Then e.KeepInEditMode = True Return End If Next entryEnd Sub
C. Protected Sub FormView1_ItemUpdating(ByVal sender As Object, _ ByVal e As System.Web.UI.WebControls.FormViewUpdateEventArgs) _ Handles FormView1.ItemUpdating Dim entry As DictionaryEntry For Each entry In e.NewValues If entry.Value.Equals("") Then e.Cancel = True Return End If Next entryEnd Sub
D. Protected Sub FormView1_ItemUpdated(ByVal sender As Object, _ ByVal e As System.Web.UI.WebControls.FormViewUpdatedEventArgs) _ Handles FormView1.ItemUpdated Dim entry As DictionaryEntry For Each entry In e.Keys If entry.Value.ToString() = System.String.Empty Then e.KeepInEditMode = True Return End If Next entryEnd Sub

最新试题

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 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 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 are creating a composite control for capturing user address information in a Web application. You define a number of properties that the user can set at design time. You need to group these properties in the Properties dialog box. In addition, you need to ensure that when users click on a particular property, they receive a short explanation of that property. The properties are shown in the exhibit.Which two actions should you perform?()

题型:多项选择题

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

题型:多项选择题