0
Q:

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.

Answer:   B) For each image, set the ToolTip property to specify the text you want to display.



Explanation:

WebControl.ToolTip property gets or sets the text displayed when the mouse pointer hovers over the Web server control. The use of the ToolTip property meets the requirement of this scenario.

 

Incorrect Answers:

A: The AlternateText property is used to specify the text to display if the image is not available.


C: The RaiseBubbleEvent is not useful here. ASP.NET server controls such as the Repeater, DataList and DataGrid Web controls can contain child controls that raise events. Rather than each button raising an event individually, events from the nested controls are "bubbled"—that is, they are sent to the control's parent.


D: The ToStringMethod() would not by itself provide the functionality required.

Q:

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You use the ADO.NET Entity Data Model (EDM) to define a Customer entity. You need to add a new Customer to the data store without setting all the customer's properties. What should you do?

A) Call the Create method of the Customer object. B) Call the CreateObject method of the Customer object.
C) Override the Create method for the Customer object. D) Override the SaveChanges method for the Customer object.
 
Answer & Explanation Answer: B) Call the CreateObject method of the Customer object.

Explanation:
Report Error

View Answer Report Error Discuss

0 2564
Q:

You use Microsoft Visual Studio 2010 and Microsoft ADO.NET Framework 4 to create an application. The application connects to a Microsoft SQL Server 2008 database. You use the ADO.NET LINQ to SQL model to retrieve data from the database. You use stored procedures to return multiple result sets. You need to ensure that the result sets are returned as strongly typed values. What should you do?

A) Apply the FunctionAttribute and ResultTypeAttribute to the stored procedure function. Use the GetResult B) Apply the FunctionAttribute and ParameterAttribute to the stored procedure function and directly access the strongly typed object from the results collection.
C) Apply the ResultTypeAttribute to the stored procedure function and directly access the strongly typed object from the results collection. D) Apply the ParameterAttribute to the stored procedure function. Use the GetResult
 
Answer & Explanation Answer: A) Apply the FunctionAttribute and ResultTypeAttribute to the stored procedure function. Use the GetResult

Explanation:
Report Error

View Answer Report Error Discuss

0 2441
Q:

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an
application. You use the ADO.NET Entity Framework to model entities. You write the following code segment. (Line numbers are included for reference only.)


01AdventureWorksEntities context = New AdventureWorksEntities
02
03var q = from c in context.Customers
04where c.City == "London"
05orderby c.CompanyName
06select c;


You need to ensure that the application meets the following requirements: "Compares the current values of unmodified properties with values returned from the data source". Marks the property as modified when the properties are not the same. Which code segment should you insert at line 02?

A) context.MergeOption = MergeOption.AppendOnly; B) context.MergeOption = MergeOption.PreserveChanges;
C) context.MergeOption = MergeOption.OverwriteChanges; D) context.MergeOption = MergeOption.NoTracking;
 
Answer & Explanation Answer: B) context.MergeOption = MergeOption.PreserveChanges;

Explanation:
Report Error

View Answer Report Error Discuss

0 2978
Q:

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an
application. The application connects to a Microsoft SQL Server database. The application stores encrypted credit card numbers in the database. You need to ensure that credit card numbers can be extracted from the database.
Which cryptography provider should you use?

A) DSACryptoServiceProvider B) AESCryptoServiceProvider
C) MD5CryptoServiceProvider D) SHA1CryptoServiceProvider
 
Answer & Explanation Answer: B) AESCryptoServiceProvider

Explanation:
Report Error

View Answer Report Error Discuss

0 2727
Q:

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application uses the ADO.NET Entity Framework to manage customer and related order records. You add a new order for an existing customer. You need to associate the Order entity with the Customer entity. What should you do?

A) Set the Value property of the EntityReference of the Order entity. B) Call the Add method on the EntityCollection of the Order entity.
C) Use the AddObject method of the ObjectContext to add both Order and Customer entities. D) Use the Attach method of the ObjectContext to add both Order and Customer entities.
 
Answer & Explanation Answer: A) Set the Value property of the EntityReference of the Order entity.

Explanation:
Report Error

View Answer Report Error Discuss

0 2190
Q:

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an
application. The application connects to a Microsoft SQL Server database. The application has two DataTable objects that reference the Customers and Orders tables in the database. The application contains the following code segment. (Line numbers are included for reference only.)


01DataSet customerOrders = new DataSet();
02customerOrders.EnforceConstraints = true;
03ForeignKeyConstraint ordersFK = new ForeignKeyConstraint("ordersFK",
04customerOrders.Tables["Customers"].Columns["CustomerID"],
05customerOrders.Tables["Orders"].Columns["CustomerID"]);
06
07customerOrders.Tables["Orders"].Constraints.Add(ordersFK);


You need to ensure that an exception is thrown when you attempt to delete Customer records that have related Order records. Which code segment should you insert at line 06?

A) ordersFK.DeleteRule = Rule.SetNull; B) ordersFK.DeleteRule = Rule.None;
C) ordersFK.DeleteRule = Rule.SetDefault; D) ordersFK.DeleteRule = Rule.Cascade;
 
Answer & Explanation Answer: B) ordersFK.DeleteRule = Rule.None;

Explanation:
Report Error

View Answer Report Error Discuss

0 2264
Q:

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application uses the ADO.NET Entity Framework to model entities. The application allows users to make changes to entities while disconnected from the central data store.

 

You need to ensure that when the user connects to the central data store and retrieves new data, the application meets the following requirements:

  • Changes made to the local data store in disconnected mode are preserved.
  • Entities that have already been loaded into the local data store, but have not been modified by the user, are updated with the latest data.

What should you do?

A) Call the query's Execute method by using the MergeOptions.AppendOnly option. B) Call the query's Execute method by using the MergeOptions.OverwriteChanges option.
C) Call the Refresh method of ObjectContext by using the RefreshMode.StoreWins option. D) Call the Refresh method of ObjectContext by using the RefreshMode.ClientWins method.
 
Answer & Explanation Answer: D) Call the Refresh method of ObjectContext by using the RefreshMode.ClientWins method.

Explanation:
Report Error

View Answer Report Error Discuss

0 2680
Q:

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Communication Foundation (WCF) Data Services service. You discover that when an application submits a PUT or DELETE request to the Data Services service, it receives an error. You need to ensure that the application can access the service. Which header and request type should you use in the application?

A) an X-HTTP-Method header as part of a POST request B) an X-HTTP-Method header as part of a GET request
C) an HTTP ContentType header as part of a POST request D) an HTTP ContentType header as part of a GET request
 
Answer & Explanation Answer: A) an X-HTTP-Method header as part of a POST request

Explanation:
Report Error

View Answer Report Error Discuss

0 2149