GMT: Thứ Tư, ngày 20  tháng 3, năm 2019 . .   
Đăng nhập tạm thời:  

Căn Bản    Văn Phòng    Hệ Thống - Mạng    Phần Mềm Ứng Dụng    Kỹ thuật số    Lập trình    SQL   
 C#     C++     Visual Basic     Visual Foxpro     C     Java     Pascal     Thiết Kế Web     ASP.NET     XML     CSS     PHP   

Trắc Nghiệm ASP.NET (English) - Bài 30
Your ASP.NET application enables users to input the URL of a Web page, and then it applies an XSLT file to show how that Web page looks on a mobile device. Which type of cotrol should you use to validate the TextBox control where the user inputs the URL? a. RegularExpressionValidator RangeValidator b. CompareValidator RequiredFieldValidator c. RangeValidator RequiredFieldValidator d. RegularExpressionValidator RequiredFieldValidator.......
Thời gian bắt đầu: Hôm nay lúc 06:42:57(Server time)
Số câu hỏi: 10.   Tổng điểm: 10
Thời gian làm bài: 20 phút.  Thời gian còn lại: 
Cỡ chữ câu hỏi:  Cỡ chữ đáp án:
1-
Your ASP.NET application enables users to input the URL of a Web page, and then it applies an XSLT file to show how that Web page looks on a mobile device. Which type of cotrol should you use to validate the TextBox control where the user inputs the URL?
A-
RegularExpressionValidator
RangeValidator
B-
CompareValidator
RequiredFieldValidator
C-
RangeValidator
RequiredFieldValidator
D-
RegularExpressionValidator
RequiredFieldValidator
2-
Your Web application includes a Label control with an IS of lblCaption and a TextBox control with an ID of txtData. The Text property of the Label control is set to Enter Data. Which two properties of the TextBox control should you set to ensure that it can be accessed by the expected keyboard actions?
A-
TextMode, AccessKey
B-
TabIndex, AccessKey
C-
CssClass, AccessKey
D-
TabIndex, CssClass
3-
Your company has recently decided to upgrate its supplier evaluation system from ASP to ASP.NET. You want to convert old ASP pages to Web forms as quickly as possible. You have noticed that you can keep the existing user interface but want to move the bussiness logic to code-behind files. Which of the following approaches provides the smoothest migration path?
A-
Apply the runat="server" attribute to all HTML controls. In the code-behind files, rewrite all business logic using C#.
B-
Continue to use HTML controls on ASP.NET Web forms. In the code-behind files, rewrite all business logic using C#.
C-
Continue to use HTML controls for labels and text boxes but convert all Button controls to Web server controls. In the code-behind files, rewrite all bussiness logic using C#.
D-
Use ASP.NET Web server controls instead of HTML controls. In the code-behind files, rewrite all business logic using C#
4-
Your application includes a SqlDataAdapter object named sqlDataAdapter1 that was created by dragging and dropping the Physicians table from a database to your from.
Your application also includes a DataSet object named dsPhysicians1 that is based on this SqlDataAdapter object.
Which line of code should you use to load the data from the database into the DataSet object?
A-
dsPhysicians = sqlDataAdapter1.Fill("Physicians"):
B-
sqlDataAdapter1.Fill("dsPhysicians1"):
C-
sqlDataAdapter1.Fill("dsPhysicians1,"Physicians"):
D-
sqlDataAdapter1.Fill("dsPhysicians1","Physicians"):
5-
Your ASP.NET Web appliation includes a SqlDataAdapter object named sqlDataAdapter1 that was created by dragging and dropping the Customers table from a database to your form.
Your application also includes a DataSet named dsCustomers1, based on this SqlDataAdapter.
Which line of code should you use to load the data from the database into the DataSet?
A-
sqlDataAdapter1.Fill("dsCustomers1","Customers"):
B-
sqlDataAdapter1.Fill(dsCustomers1):
C-
dsCustomers1=sqlDataAdapter1.Fill("Customers"):
D-
sqlDataAdapter1.Fill("dsCustomers1,"Customers"):
6-
Your application uses a SqlDataReader object to retrieve information form a medical records database. When you find a patient who is currently hospitalized, you want to read the names of the patient’s carefivers from the same database.
You have created a second SqlDataReader object, based on a second SqlCommand object, to retrieve the caregiver information.
When you call the ExecuteReader() method of the SqlCommand object, you get an error.
What is the most likely cause of this error?
A-
You are using the same SqlConnection object for both the SqlDataReader objects, and the first SqlDataReader is still open when you try to execute the SqlCommand.
B-
You are using the ExecuteReader() method of the SqlCommand object and should be using the ExecuteScalar() mehtod instead.
C-
You must use the OleDbDataReader orbject to retrieve information instead of the SqlDataReader object.
D-
You must use SqlDataAdapter object to retrieve the caregiver information.
7-
Your application allows the user to edit product data on a DatGrid control, which is bound to a DataSet object. The DataSet object is filled through a SqlDataAdapter object.
The InsertCommand, UpdateCommand, and DeleteCommand properties of the SqlDataAdapter object are set to SqlCommand objects, and you have tested the SQL in those SqlCommand objects.
When users submit the page, none of their changes are saved to the database, and they do not receive any errors.
What could be the problem?
A-
The DatSet object is a read-only object.
B-
The users do not have permission to write to the database.
C-
You have neglected to fill the DataSet object from the DatGrid control after the users finish editing the data.
D-
You have neglected to call the SqlDataAdapter.Update() mehtod in your code.
8-
Your application includes a DataSet object that contains a DataTable object named Suppliers. This DatTable object contains all the rows from the Suppliers table in your database. You want to bind an object to a DataGrid control on a form such that the DataGrid control displays only the suppliers from Pennsylvania.
What should you do?
A-
Use a foreach loop to move through the entire suppliers Data Table object. Each time you find a DataRow object representing a supplier from Pennsylvania, bind that DataRow object to the DatGrid control.
B-
Create a filterd DataView object from the suppliers DataTable object and bind the DataView object to the DataGrid control.
C-
Created a filtered array by calling the Data Table.Select() method on the suppliers Data Table object and bind the array to the DataGrid control.
D-
Create a new SqlCommand object to retrieve only suppliers from Pennsylvania. Use a new SqlDataAdapter object to fill a new DataSet object with these with these suppliers. Then bind the new DataSet object to the DataGrid control.
9-
Your application invokes a Web service named Northwind that includes a Web method named GetOrders(). GetOrders() returns a DataSet object containing order information.
What must you do to use this DataSet object in your client application?
A-
Created a new DataSet object and use the ReadXml() method of DataSet to initialize it from returning SOAP message.
B-
Assign the return value from the GetOrders() method to an array of DataRow variables. Then loop through the array to build the DataSet object.
C-
Obtain an XSD file that specifies the schema of the DatSet object. Then use this XSD file to instantiate a DataSet object from the returned data from the GetOrders() method.
D-
Assign the return value from the GetOrders() method to a DataSet Variable.
10-
Your application uses a SqlDataReader object to retrieve information about customer balances.
When you find a past-due balance, you want to write a new entry to a billing table by executing a stored procedure. Calling the ExecuteNonQuery( ) mehtod of the SqlCommand object is causing an error.
What is the most likely cause of this error?
A-
You must use an ad hoc SQL statement rather than a stored procesure to insert new rows in a database.
B-
You are using the ExecuteNonQuery() method of the SqlCommand object, and you should be using the ExecuteScalar() method instead.
C-
You must use a SqlDataAdapter object to execute the stored procedure.
D-
You are using the same SqlConnection object for both the SqlDataReader object and the SqlCommand object, and the SqlDataReader object is still open when you try to execute the SqlCommand object.
[ Thành Lãm - ST ]

Chia sẻ trên Facebook   Google Boomarks   Google Buzz    Xem: 908. Đăng: 13-08-2012.   

Support Link:
Thông tin trang Web. Online since: 2011.
Disclaimer of Liability and Endorsement:
free counters
VNEDU.ORG IS A NON-PROFIT WEBSITE! All contents throughout this website are from Internet and other sources and are posted by users, copyright belongs to its original author. VNEDU.ORG stores for educational purpose only. VNEDU.ORG resumes no responsibility and liability, make no promise, or guarantee for the accuracy or efficiency of any content. If you find any content that is in violation of copyright laws, please notify us and we will immediately remove them. Thank you for visiting VNEDU.ORG