Asp.net Microsoft certification new exam question bank and answer 1, asp.net exam question bank

Source: Internet
Author: User

Asp.net Microsoft certification new exam question bank and answer 1, asp.net exam question bank

1. You have created an ASP.net application that runs on the WEB site of TK. Your application contains 100 WEB pages. If you want to configure your application, a custom error message is displayed when an HTTP code error occurs. At the same time, you want to record the program errors to the log. If you want to achieve this goal with minimal configuration impact, what two things do you have to do? (Select two items) (AD)

A. Create the Application_Error process for the application in the Global. asax file to control ASP.net code errors;

B. Create the Application_Error process for the application in the Web. config file to control ASP.net code errors;

C. Create a CustomErros event for the application in the Global. asax file to control HTTP errors;

D. Create a CustomErros process for the application in the Web. config file to control HTTP errors;

E. Add the Page command for each Page of the application to control ASP.net code errors;

F. Add the Page command for each Page in the application to control HTTP errors;

Note: Because the Application_Error process does not exist in the Web. config file, "B" is incorrect. Similarly, "C" is also incorrect. E and F are irrelevant to this question.

2. You have created an ASP.net application for TK. Earlier versions of this application use an ActiveX component written in VB6.0. The new ASP.net application will continue to use this ActiveX component. You want to make the data collection between your ASP.net application and ActiveX components as fast as possible. Which of the following operations should you choose? (CD)

A. bind with ODBC;

B. bind with late;

C. bind with early;

D. Set the AspCompat attribute in the Page command to True;

E. Set the AspCompat attribute in the Page command to False.

Note: When the AspCompat attribute is set to true, page execution can be performed on a single-threaded unit (STA) thread. This allows pages to call the STA components, such as those developed with Microsoft Visual Basic 6.0. Set this property to true and allow page calls to COM + 1.0 components. This component requires access to the embedded objects of the unmanaged Active Server Pages (ASP. D is required. ODBC binding is an old binding method. It is very slow and has been replaced by SQL and OLEDB. Both B and C can achieve this goal, however, the binding method of item C performs better.

3. You have created an ASP.net application to publish custom news content. You can make a choice on an ASP.net page. Your code creates a DataSet object named TKNewsItems, which contains news entries that are displayed according to the selected Standard. You have created a style table named NewsStyle. xsl in HTML to report data in TKNewsItems. You have written the following code snippet:

 

If you want to display the transmitted data in HTML text format, which of the following code should you add to the end of the above Code segment? ()

 

C d: Output in XML file;

Transform: provides the object for data conversion;

Note: The Transform. Transform method is used to convert XML data using the loaded XSLT style table. Because this question is about configuring data, select A instead of B because it is not about to read data.

4. You have created an ASP.net application that uses the DataGrid Control to display the list of stored products. The product database is stored in an SQL Server database named TestKingDB. Each product uses a Value Field named ProductID. Each product has a character field named ProductName. You write the ADO.net code, and use the SqlDataAdapter object and SqlCommand object to obtain data from the database by calling the stored procedure. You set the CommandType attribute of the SqlCommand object to CommandTyp. StoredProcedure, And the CommandText attribute to procProductList. Your code uses the product list data sorted in descending order of the ProductID field to successfully fill in a DataTable object. What should you do if you want to re-display data in alphabetical order of ProductName fields? (B)

A. Change the CommandType attribute of the SqlCommand object to CommandType. Text. Change the CommandText attribute of the SqlCommand object to the following code: bind the DataGrid Control to the DataTable object;

B. Create a DataView object based on the DataTable object. Set the Sort attribute of the DataView object to "ProductName DESC". Bind The DataGrid Control to the DataView object. Sort the data again, the original display sequence is not changed. You can use the Dataview object, which only changes the data sorting in the memory and does not change the data source;

C. Set the AllowSorting attribute of the DataGrid Control to True. Set the SortExpression of the DataGridColumn to use "ProductName DESC" to display ProductName. Bind The DataGrid Control to the DataTable object;

D. Set the DisplayExpression attribute of the able object to bind the DataGrid Control to the DataTable object;

Note: Sort attribute: gets or sets one or more Sort columns and their order of DataView.

AllowSorting attribute: gets or sets a value indicating whether the grid can be re-ordered by clicking the column header.

DisplayExpression attribute: gets or sets the expression that returns a value. This value is used to indicate the table in the user interface.

The root cause of this question is the data source sorting method. Neither A, C, or D can achieve this goal.


Urgent questions for the aspnet exam

Asp.net Microsoft certification test question bank wenku.baidu.com/...7.html

Microsoft certified exam questions and answers over the years?

If you are looking for something related to Microsoft certification exam materials, you can look at these: (a) Microsoft certification exam questions and answers over the years, (B) Microsoft certification exam simulated questions over the years, (c) Microsoft certification exam news and news. You can find these three exam materials in blog.sina.com.cn/s/blog_624aac1b0100f8nb.html, Because I have found them here before, I hope my answer will help you. Thank you!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.