Microsoft Certified Solutions Developer (MCSD).NET 70 315 Interview Questions

 
1.
Suppose You are creating an ASP.NET page for selling movie tickets. Users select a region, and then they
select from a list of cities in that region. The site displays the names and locations of movie
theaters in the city selected by the user.
Your company, XYZ Brothers, maintains a list of theaters in a database table that includes the
city, name, and street address of each theater. You want to minimize the time required to retrieve
and display the list of theater names after a user selects the region and city.
What should you do?
A. Modify the connection string to add the packet size property and set its values to 8192.
B. Add the following directive to the page:
OutputCache VaryByParam=?city?
C. Add the following directive to the page:
OutputCache VaryByControl=?region;city?
D. Modify the connection string to keep your database?s connection pool as small as possible.
2.
Suppose You are creating an ASP.NET page for XYZ. You create a DataGrid control that displays past
purchases made by the user. The DataGrid control is populated from an existing database when
the page is created.
The page contains TextBox controls that allow users to update their personal information, such as
address and telephone number.
You need to ensure that the page is refreshed as quickly as possible when users update their
contact information.
What should you do?
A. Set the Enable property of the DataGrid control to false.
B. Set the EnableViewState property of the DataGrid to false.
C. Write code in the Page.Load event handler that populates the DataGrid control only when the
IsPostBack property of the page is false.
D. Write in the Page.Load event handler that populates the DataGrid control only when the
IsPostBack property of the page is true.
3.
You ASP.NET application manages order entry data by using a DataSet object named
EXorderEntry. The EXorderEntry object includes two DataTable objects named orderNames and
OrderDetails. A ForeignKeyConstraint object named orderDetailsKey is defined between the two
DataTable objects.
You attempt to delete a row in orderNames while there are related rows in OrderDetails, and an
exception is generated.
What is the most likely cause of the problem?
A. The current value of OrderDetails.KeyDeleteRule is Rule.Cascade.
B. The current value of OrderDetails.KeyDeleteRule is Rule.SetNull.
C. The current value of OrderDetails.KeyDeleteRule is Rule.SetDefault.
D. The current value of OrderDetails.KeyDeleteRule is Rule.None.
4.
You create an ASP.NET page that uses images to identify areas where a user can click to initiate
actions. The users of the application use Internet Explorer.
You want to provide a pop-up window when the user moves the mouse pointer over an image.
You want the pop-up window to display text that identifies the action that will be taken if the user
clicks the image.
What should you do?
A. For each image, set the AlternateText property to specify the text you want to display, and set
the ToolTip property to True.
B. For each image, set the ToolTip property to specify the text you want to display.
C. In the onmouseover event handler for each image, add code that calls the RaiseBubbleEvent()
method of the System.Web.UI.WebControls.Image class.
D. In the onmouseover event handler for each image, add code that calls the ToString() method
of the System.Web.UI.WebControls.Image class.
5.
You create an ASP.NET application that produces sales reports for the XYZ corporation.
The sales data is stored in a Microsoft SQL Server database that is used for transaction
processing. The application consists of complex Transact-SQL statements.
Many users report that the report generation is taking longer to run each day. You need to
improve response times.
What are two possible ways to achieve this goal? (Each correct answer presents a complete
solution. Choose two)
A. Use an OleDbDataAdapter indexes exist on the SQL Server tables.
B. Ensure that appropriate indexes exist in the SQL Server tables.
C. Rewrite your SQL statements to use aliases for all table names.
D. Rewrite your direct SQL statements as stored procedures and call the stored procedures from
your application.
E. Configure queries to run in the security context of the user who is running the query.
6.
You are creating a Web site for XYZ. You receive product lists in the form of XML documents.
You are creating a procedure to extract information from these XML documents according to
criteria that your users will select.
When a user makes a request, you want the results of these requests to be returned as quickly
as possible. What should you do?
A. Create an XmlDataDocument object and load it with the XML data.
Use the DataSet property of the object to create a DataSet object.
Use a SQL SELECT statement to extract the requested data.
B. Create an XmlDataDocument object and load it with the XML data.
Use the SelectNodes method of the object to extract the requested data.
C. Create an XPathDocument object and load it with the XML data.
Call the CreateNavigator method to create an XPathNavigator object.
Call the Select method of the XPathNavigator object to run an XPath query that extracts the
requested data.
D. Create an XmlReader object.
Use the Read method of the object to stream through the XML data and to apply an Xpath
expression to extract the requested data.
7.
You are creating an ASP.NET page for a travel service. The page contains a CheckBoxList
control that contains travel destinations. Customer can select favorite destinations to receive
weekly e-mail updates of travel packages.
The CheckBoxList control is bound to a database table of possible destinations. Each destination
is ranked according to its popularity. You modify the page to sort the destination list by rank, from
the most popular to the least popular. The list has three columns.
You want the most popular destination to be on the top row of the check box list at run time.
Which property setting should you use for the CheckBoxList control?
A. Set the RepeatDirection property to Vertical.
B. Set the RepeatDirection property to Horizontal.
C. Set the RepeatLayout property to Flow.
D. Set the RepeatLayout property to Table.
8.
Suppose You ASP.NET application manages order entry data by using a DataSet object named
EXorderEntry. The EXorderEntry object includes two DataTable objects named orderNames and
OrderDetails. A ForeignKeyConstraint object named orderDetailsKey is defined between the two
DataTable objects.
You attempt to delete a row in orderNames while there are related rows in OrderDetails, and an
exception is generated.
What is the most likely cause of the problem?
A. The current value of OrderDetails.KeyDeleteRule is Rule.Cascade.
B. The current value of OrderDetails.KeyDeleteRule is Rule.SetNull.
C. The current value of OrderDetails.KeyDeleteRule is Rule.SetDefault.
D. The current value of OrderDetails.KeyDeleteRule is Rule.None.
9.
Suppose You are planning the deployment of an ASP.NET application named XYZApp. XYZApp uses a
Visual Studio .NET component named DataAccess that will be shared with other applications on
your Web server.
You are using Visual Studio .NET to create a Windows Installer package. You need to deploy
DataAccess and the ASP.NET application so that they can be uninstalled later if necessary.
What should you do?
A. Create a setup project for DataAccess.
Add the ASP.NET application in a custom action.
B. Create a setup project for the ASP.NET application.
Create another setup project for DataAccess.
C. Create a Web setup project for the ASP.NET application.
Add a project output for DataAccess.
D. Create a Web setup project for the ASP.NET application.
Add a merge module for DataAccess.
10.
Suppose You are creating an ASP.NET application for XYZ. Your application will call an XML Web service
run by Wide World Importers. The XML Web service will return an ADO.NET DataSet object
containing a list of companies that purchase wine.
You need to make the XML Web service available to your application.
What should you do?
A. On the .NET tab of the Reference dialog box, select System.Web.Services.dll.
B. In the Web References dialog box, type the address of the XML Web service.
C. Add a using statement to your Global.asax.cs file, and specify the address of the XML Web
service.
D. Write an event handler in the Global.asax.cs file to import the .wsdl and .disco files associated
with the XML Web service.
11.
Suppose You create English, French, and German versions of a test engine ASP.NET application you are
developing for XYZ Inc. You have separate resource files for each language version.
You need to deploy the appropriate resource file based on the language settings of the server.
What should you do?
A. Create an installer and set the Installer.Context property for each version of your application.
B. Create an installer that has a launch condition to verify the locale settings.
C. Create an installer that has a custom action to install only location-specific files.
D. Create an installer that has an MsiConfigureProduct function to install the appropriate version.
12.
Suppose You are creating an ASP.NET application for XYZ. An earlier version of the application uses
ActiveX components that are written in Visual Basic 6.0. The new ASP.NET application will
continue to use the ActiveX components.
You want the marshaling of data between your ASP.NET application and the ActiveX
components to occur as quickly as possible.
Which two actions should you take? (Each correct answer presents part of the solution. Choose
two)
A. Use ODBC binding.
B. Use late binding.
C. Use early binding
D. Set the AspCompat attribute of the Page directive to true.
E. Set the AspCompat attribute of the Page directive to false.
13.
You are creating an ASP.NET application to track XYZ sales orders. The application uses an
ADO.NET DataSet object that contains two DataTable objects. One table is named Orders, and
the other table is named OrderDetails. The application displays data from the Orders table in a list
box. You want the order details for an order to be displayed in a grid when a user selects the
order in the list box. You want to modify these objects to enable your code to find all the order
details for the selected order.
What should you do?
A. Add a DataRelation object to the Relations collection of the DataSet object.
B. Use the DataSet.Merge method to connect the Orders table and the OrderDetails table to each
other.
C. Add a ForeignKeyConstraint to the OrderDetails table.
D. Add a keyref constraint to the DataSet schema.
14.
Suppose You are configuring your ASP.NET application XYZApp. XYZApp will be hosted on a Web server
that also runs other applications.
You want to prevent any changes to the configuration settings of your application after the
application is deployed.
What should you do?
A. In the Machine.config file, set the allowOverride attribute in the location element to False.
Make no other changes to the Machine.config file.
B. In the Web.config file, set the allowOverride attribute in the location element to False.
Make no other changes to the Web.config file.
C. In the Machine.config file, set the allowOverride attribute in the appSettings element to False.
Make no other changes to the Machine.config file.
D. In the Web.config file, set the allowOverride attribute in the appSettings element to False.
Make not other changes to the Web.config file.
15.
Suppose You create an ASP.NET application to provide corporate news and information to XYZ?s
employees. The application is used by employees in New Zealand.
Default.aspx has a Web Form label control named currentDateLabel. The Page.Load event
handler for Default.aspx included the following line of code:
currentDateLabel.Text = DateTime.Now.ToString(?D?)
You need to ensure that the data is displayed correctly for employees in New Zealand. What
should you do?
A. In the Web.config file for the application, set the culture attribute of the globalization element to
en-NZ.
B. In the Web.config file for the application, set the uiCulture attribute of the globalization element
to en-NZ.
C. In Visual Studio .NET, set the responseEncoding attribute in the page directive for
Default.aspx to UTF-8.
D. In Visual Studio .NET, save the Default.aspx page for both versions of the application by
selecting Advanced Save Options from the File menu and selecting UTF-8.
16.
Suppose You are creating an ASP.NET page for XYZ. The page uses string concatenation to gather data
from multiple e-mail messages and format the data for display on the page.
You want to ensure that the page displays as quickly as possible.
What should you do?
A. Write code that uses the Append method of the StringBuilder object.
B. Write code that uses the Substring method of the String object.
C. Write code that uses the Concat method of the String object.
D. Write code that uses the plus-sign (+) operator to concatenate the strings.
17.
Suppose You are creating an ASP.NET page for selling movie tickets. Users select a region, and then they
select from a list of cities in that region. The site displays the names and locations of movie
theaters in the city selected by the user.
Your company, XYZ Brothers, maintains a list of theaters in a database table that includes the
city, name, and street address of each theater. You want to minimize the time required to retrieve
and display the list of theater names after a user selects the region and city.
What should you do?
A. Modify the connection string to add the packet size property and set its values to 8192.
B. Add the following directive to the page:
OutputCache VaryByParam=?city?
C. Add the following directive to the page:
OutputCache VaryByControl=?region;city?
D. Modify the connection string to keep your database?s connection pool as small as possible.
18.
Suppose You are creating an ASP.NET page for XYZ. You create a DataGrid control that displays past
purchases made by the user. The DataGrid control is populated from an existing database when
the page is created.
The page contains TextBox controls that allow users to update their personal information, such as
address and telephone number.
You need to ensure that the page is refreshed as quickly as possible when users update their
contact information.
What should you do?
A. Set the Enable property of the DataGrid control to false.
B. Set the EnableViewState property of the DataGrid to false.
C. Write code in the Page.Load event handler that populates the DataGrid control only when the
IsPostBack property of the page is false.
D. Write in the Page.Load event handler that populates the DataGrid control only when the
IsPostBack property of the page is true.
19.
You ASP.NET application manages order entry data by using a DataSet object named
EXorderEntry. The EXorderEntry object includes two DataTable objects named orderNames and
OrderDetails. A ForeignKeyConstraint object named orderDetailsKey is defined between the two
DataTable objects.
You attempt to delete a row in orderNames while there are related rows in OrderDetails, and an
exception is generated.
What is the most likely cause of the problem?
A. The current value of OrderDetails.KeyDeleteRule is Rule.Cascade.
B. The current value of OrderDetails.KeyDeleteRule is Rule.SetNull.
C. The current value of OrderDetails.KeyDeleteRule is Rule.SetDefault.
D. The current value of OrderDetails.KeyDeleteRule is Rule.None.
20.
You create an ASP.NET page that uses images to identify areas where a user can click to initiate
actions. The users of the application use Internet Explorer.
You want to provide a pop-up window when the user moves the mouse pointer over an image.
You want the pop-up window to display text that identifies the action that will be taken if the user
clicks the image.
What should you do?
A. For each image, set the AlternateText property to specify the text you want to display, and set
the ToolTip property to True.
B. For each image, set the ToolTip property to specify the text you want to display.
C. In the onmouseover event handler for each image, add code that calls the RaiseBubbleEvent()
method of the System.Web.UI.WebControls.Image class.
D. In the onmouseover event handler for each image, add code that calls the ToString() method
of the System.Web.UI.WebControls.Image class.
21.
You create an ASP.NET application that produces sales reports for the XYZ corporation.
The sales data is stored in a Microsoft SQL Server database that is used for transaction
processing. The application consists of complex Transact-SQL statements.
Many users report that the report generation is taking longer to run each day. You need to
improve response times.
What are two possible ways to achieve this goal? (Each correct answer presents a complete
solution. Choose two)
A. Use an OleDbDataAdapter indexes exist on the SQL Server tables.
B. Ensure that appropriate indexes exist in the SQL Server tables.
C. Rewrite your SQL statements to use aliases for all table names.
D. Rewrite your direct SQL statements as stored procedures and call the stored procedures from
your application.
E. Configure queries to run in the security context of the user who is running the query.
22.
You are creating a Web site for XYZ. You receive product lists in the form of XML documents.
You are creating a procedure to extract information from these XML documents according to
criteria that your users will select.
When a user makes a request, you want the results of these requests to be returned as quickly
as possible. What should you do?
A. Create an XmlDataDocument object and load it with the XML data.
Use the DataSet property of the object to create a DataSet object.
Use a SQL SELECT statement to extract the requested data.
B. Create an XmlDataDocument object and load it with the XML data.
Use the SelectNodes method of the object to extract the requested data.
C. Create an XPathDocument object and load it with the XML data.
Call the CreateNavigator method to create an XPathNavigator object.
Call the Select method of the XPathNavigator object to run an XPath query that extracts the
requested data.
D. Create an XmlReader object.
Use the Read method of the object to stream through the XML data and to apply an Xpath
expression to extract the requested data.
23.
You are creating an ASP.NET page for a travel service. The page contains a CheckBoxList
control that contains travel destinations. Customer can select favorite destinations to receive
weekly e-mail updates of travel packages.
The CheckBoxList control is bound to a database table of possible destinations. Each destination
is ranked according to its popularity. You modify the page to sort the destination list by rank, from
the most popular to the least popular. The list has three columns.
You want the most popular destination to be on the top row of the check box list at run time.
Which property setting should you use for the CheckBoxList control?
A. Set the RepeatDirection property to Vertical.
B. Set the RepeatDirection property to Horizontal.
C. Set the RepeatLayout property to Flow.
D. Set the RepeatLayout property to Table.
24.
Suppose You ASP.NET application manages order entry data by using a DataSet object named
EXorderEntry. The EXorderEntry object includes two DataTable objects named orderNames and
OrderDetails. A ForeignKeyConstraint object named orderDetailsKey is defined between the two
DataTable objects.
You attempt to delete a row in orderNames while there are related rows in OrderDetails, and an
exception is generated.
What is the most likely cause of the problem?
A. The current value of OrderDetails.KeyDeleteRule is Rule.Cascade.
B. The current value of OrderDetails.KeyDeleteRule is Rule.SetNull.
C. The current value of OrderDetails.KeyDeleteRule is Rule.SetDefault.
D. The current value of OrderDetails.KeyDeleteRule is Rule.None.
25.
Suppose You are planning the deployment of an ASP.NET application named XYZApp. XYZApp uses a
Visual Studio .NET component named DataAccess that will be shared with other applications on
your Web server.
You are using Visual Studio .NET to create a Windows Installer package. You need to deploy
DataAccess and the ASP.NET application so that they can be uninstalled later if necessary.
What should you do?
A. Create a setup project for DataAccess.
Add the ASP.NET application in a custom action.
B. Create a setup project for the ASP.NET application.
Create another setup project for DataAccess.
C. Create a Web setup project for the ASP.NET application.
Add a project output for DataAccess.
D. Create a Web setup project for the ASP.NET application.
Add a merge module for DataAccess.
26.
Suppose You are creating an ASP.NET application for XYZ. Your application will call an XML Web service
run by Wide World Importers. The XML Web service will return an ADO.NET DataSet object
containing a list of companies that purchase wine.
You need to make the XML Web service available to your application.
What should you do?
A. On the .NET tab of the Reference dialog box, select System.Web.Services.dll.
B. In the Web References dialog box, type the address of the XML Web service.
C. Add a using statement to your Global.asax.cs file, and specify the address of the XML Web
service.
D. Write an event handler in the Global.asax.cs file to import the .wsdl and .disco files associated
with the XML Web service.
27.
Suppose You create English, French, and German versions of a test engine ASP.NET application you are
developing for XYZ Inc. You have separate resource files for each language version.
You need to deploy the appropriate resource file based on the language settings of the server.
What should you do?
A. Create an installer and set the Installer.Context property for each version of your application.
B. Create an installer that has a launch condition to verify the locale settings.
C. Create an installer that has a custom action to install only location-specific files.
D. Create an installer that has an MsiConfigureProduct function to install the appropriate version.
28.
Suppose You are creating an ASP.NET application for XYZ. An earlier version of the application uses
ActiveX components that are written in Visual Basic 6.0. The new ASP.NET application will
continue to use the ActiveX components.
You want the marshaling of data between your ASP.NET application and the ActiveX
components to occur as quickly as possible.
Which two actions should you take? (Each correct answer presents part of the solution. Choose
two)
A. Use ODBC binding.
B. Use late binding.
C. Use early binding
D. Set the AspCompat attribute of the Page directive to true.
E. Set the AspCompat attribute of the Page directive to false.
29.
You are creating an ASP.NET application to track XYZ sales orders. The application uses an
ADO.NET DataSet object that contains two DataTable objects. One table is named Orders, and
the other table is named OrderDetails. The application displays data from the Orders table in a list
box. You want the order details for an order to be displayed in a grid when a user selects the
order in the list box. You want to modify these objects to enable your code to find all the order
details for the selected order.
What should you do?
A. Add a DataRelation object to the Relations collection of the DataSet object.
B. Use the DataSet.Merge method to connect the Orders table and the OrderDetails table to each
other.
C. Add a ForeignKeyConstraint to the OrderDetails table.
D. Add a keyref constraint to the DataSet schema.
30.
Suppose You are configuring your ASP.NET application XYZApp. XYZApp will be hosted on a Web server
that also runs other applications.
You want to prevent any changes to the configuration settings of your application after the
application is deployed.
What should you do?
A. In the Machine.config file, set the allowOverride attribute in the location element to False.
Make no other changes to the Machine.config file.
B. In the Web.config file, set the allowOverride attribute in the location element to False.
Make no other changes to the Web.config file.
C. In the Machine.config file, set the allowOverride attribute in the appSettings element to False.
Make no other changes to the Machine.config file.
D. In the Web.config file, set the allowOverride attribute in the appSettings element to False.
Make not other changes to the Web.config file.
31.
Suppose You create an ASP.NET application to provide corporate news and information to XYZ?s
employees. The application is used by employees in New Zealand.
Default.aspx has a Web Form label control named currentDateLabel. The Page.Load event
handler for Default.aspx included the following line of code:
currentDateLabel.Text = DateTime.Now.ToString(?D?)
You need to ensure that the data is displayed correctly for employees in New Zealand. What
should you do?
A. In the Web.config file for the application, set the culture attribute of the globalization element to
en-NZ.
B. In the Web.config file for the application, set the uiCulture attribute of the globalization element
to en-NZ.
C. In Visual Studio .NET, set the responseEncoding attribute in the page directive for
Default.aspx to UTF-8.
D. In Visual Studio .NET, save the Default.aspx page for both versions of the application by
selecting Advanced Save Options from the File menu and selecting UTF-8.
32.
Suppose You are creating an ASP.NET page for XYZ. The page uses string concatenation to gather data
from multiple e-mail messages and format the data for display on the page.
You want to ensure that the page displays as quickly as possible.
What should you do?
A. Write code that uses the Append method of the StringBuilder object.
B. Write code that uses the Substring method of the String object.
C. Write code that uses the Concat method of the String object.
D. Write code that uses the plus-sign (+) operator to concatenate the strings.
33.
Suppose You are creating an ASP.NET page for selling movie tickets. Users select a region, and then they
select from a list of cities in that region. The site displays the names and locations of movie
theaters in the city selected by the user.
Your company, XYZ Brothers, maintains a list of theaters in a database table that includes the
city, name, and street address of each theater. You want to minimize the time required to retrieve
and display the list of theater names after a user selects the region and city.
What should you do?
A. Modify the connection string to add the packet size property and set its values to 8192.
B. Add the following directive to the page:
OutputCache VaryByParam=?city?
C. Add the following directive to the page:
OutputCache VaryByControl=?region;city?
D. Modify the connection string to keep your database?s connection pool as small as possible.
34.
Suppose You are creating an ASP.NET page for XYZ. You create a DataGrid control that displays past
purchases made by the user. The DataGrid control is populated from an existing database when
the page is created.
The page contains TextBox controls that allow users to update their personal information, such as
address and telephone number.
You need to ensure that the page is refreshed as quickly as possible when users update their
contact information.
What should you do?
A. Set the Enable property of the DataGrid control to false.
B. Set the EnableViewState property of the DataGrid to false.
C. Write code in the Page.Load event handler that populates the DataGrid control only when the
IsPostBack property of the page is false.
D. Write in the Page.Load event handler that populates the DataGrid control only when the
IsPostBack property of the page is true.
35.
You ASP.NET application manages order entry data by using a DataSet object named
EXorderEntry. The EXorderEntry object includes two DataTable objects named orderNames and
OrderDetails. A ForeignKeyConstraint object named orderDetailsKey is defined between the two
DataTable objects.
You attempt to delete a row in orderNames while there are related rows in OrderDetails, and an
exception is generated.
What is the most likely cause of the problem?
A. The current value of OrderDetails.KeyDeleteRule is Rule.Cascade.
B. The current value of OrderDetails.KeyDeleteRule is Rule.SetNull.
C. The current value of OrderDetails.KeyDeleteRule is Rule.SetDefault.
D. The current value of OrderDetails.KeyDeleteRule is Rule.None.
36.
You create an ASP.NET page that uses images to identify areas where a user can click to initiate
actions. The users of the application use Internet Explorer.
You want to provide a pop-up window when the user moves the mouse pointer over an image.
You want the pop-up window to display text that identifies the action that will be taken if the user
clicks the image.
What should you do?
A. For each image, set the AlternateText property to specify the text you want to display, and set
the ToolTip property to True.
B. For each image, set the ToolTip property to specify the text you want to display.
C. In the onmouseover event handler for each image, add code that calls the RaiseBubbleEvent()
method of the System.Web.UI.WebControls.Image class.
D. In the onmouseover event handler for each image, add code that calls the ToString() method
of the System.Web.UI.WebControls.Image class.
37.
You create an ASP.NET application that produces sales reports for the XYZ corporation.
The sales data is stored in a Microsoft SQL Server database that is used for transaction
processing. The application consists of complex Transact-SQL statements.
Many users report that the report generation is taking longer to run each day. You need to
improve response times.
What are two possible ways to achieve this goal? (Each correct answer presents a complete
solution. Choose two)
A. Use an OleDbDataAdapter indexes exist on the SQL Server tables.
B. Ensure that appropriate indexes exist in the SQL Server tables.
C. Rewrite your SQL statements to use aliases for all table names.
D. Rewrite your direct SQL statements as stored procedures and call the stored procedures from
your application.
E. Configure queries to run in the security context of the user who is running the query.
38.
You are creating a Web site for XYZ. You receive product lists in the form of XML documents.
You are creating a procedure to extract information from these XML documents according to
criteria that your users will select.
When a user makes a request, you want the results of these requests to be returned as quickly
as possible. What should you do?
A. Create an XmlDataDocument object and load it with the XML data.
Use the DataSet property of the object to create a DataSet object.
Use a SQL SELECT statement to extract the requested data.
B. Create an XmlDataDocument object and load it with the XML data.
Use the SelectNodes method of the object to extract the requested data.
C. Create an XPathDocument object and load it with the XML data.
Call the CreateNavigator method to create an XPathNavigator object.
Call the Select method of the XPathNavigator object to run an XPath query that extracts the
requested data.
D. Create an XmlReader object.
Use the Read method of the object to stream through the XML data and to apply an Xpath
expression to extract the requested data.
39.
You are creating an ASP.NET page for a travel service. The page contains a CheckBoxList
control that contains travel destinations. Customer can select favorite destinations to receive
weekly e-mail updates of travel packages.
The CheckBoxList control is bound to a database table of possible destinations. Each destination
is ranked according to its popularity. You modify the page to sort the destination list by rank, from
the most popular to the least popular. The list has three columns.
You want the most popular destination to be on the top row of the check box list at run time.
Which property setting should you use for the CheckBoxList control?
A. Set the RepeatDirection property to Vertical.
B. Set the RepeatDirection property to Horizontal.
C. Set the RepeatLayout property to Flow.
D. Set the RepeatLayout property to Table.
40.
Suppose You ASP.NET application manages order entry data by using a DataSet object named
EXorderEntry. The EXorderEntry object includes two DataTable objects named orderNames and
OrderDetails. A ForeignKeyConstraint object named orderDetailsKey is defined between the two
DataTable objects.
You attempt to delete a row in orderNames while there are related rows in OrderDetails, and an
exception is generated.
What is the most likely cause of the problem?
A. The current value of OrderDetails.KeyDeleteRule is Rule.Cascade.
B. The current value of OrderDetails.KeyDeleteRule is Rule.SetNull.
C. The current value of OrderDetails.KeyDeleteRule is Rule.SetDefault.
D. The current value of OrderDetails.KeyDeleteRule is Rule.None.
41.
Suppose You are planning the deployment of an ASP.NET application named XYZApp. XYZApp uses a
Visual Studio .NET component named DataAccess that will be shared with other applications on
your Web server.
You are using Visual Studio .NET to create a Windows Installer package. You need to deploy
DataAccess and the ASP.NET application so that they can be uninstalled later if necessary.
What should you do?
A. Create a setup project for DataAccess.
Add the ASP.NET application in a custom action.
B. Create a setup project for the ASP.NET application.
Create another setup project for DataAccess.
C. Create a Web setup project for the ASP.NET application.
Add a project output for DataAccess.
D. Create a Web setup project for the ASP.NET application.
Add a merge module for DataAccess.
42.
Suppose You are creating an ASP.NET application for XYZ. Your application will call an XML Web service
run by Wide World Importers. The XML Web service will return an ADO.NET DataSet object
containing a list of companies that purchase wine.
You need to make the XML Web service available to your application.
What should you do?
A. On the .NET tab of the Reference dialog box, select System.Web.Services.dll.
B. In the Web References dialog box, type the address of the XML Web service.
C. Add a using statement to your Global.asax.cs file, and specify the address of the XML Web
service.
D. Write an event handler in the Global.asax.cs file to import the .wsdl and .disco files associated
with the XML Web service.
43.
Suppose You create English, French, and German versions of a test engine ASP.NET application you are
developing for XYZ Inc. You have separate resource files for each language version.
You need to deploy the appropriate resource file based on the language settings of the server.
What should you do?
A. Create an installer and set the Installer.Context property for each version of your application.
B. Create an installer that has a launch condition to verify the locale settings.
C. Create an installer that has a custom action to install only location-specific files.
D. Create an installer that has an MsiConfigureProduct function to install the appropriate version.
44.
Suppose You are creating an ASP.NET application for XYZ. An earlier version of the application uses
ActiveX components that are written in Visual Basic 6.0. The new ASP.NET application will
continue to use the ActiveX components.
You want the marshaling of data between your ASP.NET application and the ActiveX
components to occur as quickly as possible.
Which two actions should you take? (Each correct answer presents part of the solution. Choose
two)
A. Use ODBC binding.
B. Use late binding.
C. Use early binding
D. Set the AspCompat attribute of the Page directive to true.
E. Set the AspCompat attribute of the Page directive to false.
45.
You are creating an ASP.NET application to track XYZ sales orders. The application uses an
ADO.NET DataSet object that contains two DataTable objects. One table is named Orders, and
the other table is named OrderDetails. The application displays data from the Orders table in a list
box. You want the order details for an order to be displayed in a grid when a user selects the
order in the list box. You want to modify these objects to enable your code to find all the order
details for the selected order.
What should you do?
A. Add a DataRelation object to the Relations collection of the DataSet object.
B. Use the DataSet.Merge method to connect the Orders table and the OrderDetails table to each
other.
C. Add a ForeignKeyConstraint to the OrderDetails table.
D. Add a keyref constraint to the DataSet schema.
46.
Suppose You are configuring your ASP.NET application XYZApp. XYZApp will be hosted on a Web server
that also runs other applications.
You want to prevent any changes to the configuration settings of your application after the
application is deployed.
What should you do?
A. In the Machine.config file, set the allowOverride attribute in the location element to False.
Make no other changes to the Machine.config file.
B. In the Web.config file, set the allowOverride attribute in the location element to False.
Make no other changes to the Web.config file.
C. In the Machine.config file, set the allowOverride attribute in the appSettings element to False.
Make no other changes to the Machine.config file.
D. In the Web.config file, set the allowOverride attribute in the appSettings element to False.
Make not other changes to the Web.config file.
47.
Suppose You create an ASP.NET application to provide corporate news and information to XYZ?s
employees. The application is used by employees in New Zealand.
Default.aspx has a Web Form label control named currentDateLabel. The Page.Load event
handler for Default.aspx included the following line of code:
currentDateLabel.Text = DateTime.Now.ToString(?D?)
You need to ensure that the data is displayed correctly for employees in New Zealand. What
should you do?
A. In the Web.config file for the application, set the culture attribute of the globalization element to
en-NZ.
B. In the Web.config file for the application, set the uiCulture attribute of the globalization element
to en-NZ.
C. In Visual Studio .NET, set the responseEncoding attribute in the page directive for
Default.aspx to UTF-8.
D. In Visual Studio .NET, save the Default.aspx page for both versions of the application by
selecting Advanced Save Options from the File menu and selecting UTF-8.
48.
Suppose You are creating an ASP.NET page for XYZ. The page uses string concatenation to gather data
from multiple e-mail messages and format the data for display on the page.
You want to ensure that the page displays as quickly as possible.
What should you do?
A. Write code that uses the Append method of the StringBuilder object.
B. Write code that uses the Substring method of the String object.
C. Write code that uses the Concat method of the String object.
D. Write code that uses the plus-sign (+) operator to concatenate the strings.