Which two actions should you perform?

You are implementing a new Dynamic Data Web site.
The Web site includes a Web page that has an ObjectDataSource control named ObjectDataSource1.
ObjectDataSource1 interacts with a Web service thatexposes methods for listing and editing instances of a
class named Product.
You add a GridView control named GridView1 to the page, and you specify that GridView1 should use
ObjectDataSource1 as its data source.
You then configure GridView1 to auto-generate fields and to enable editing.
You need to add Dynamic Data behavior to GridView1.
You also must ensure that users can use GridView1 to update Product instances.
Which two actions should you perform? (Each correctanswer presents part of the solution. Choose two.)

You are implementing a new Dynamic Data Web site.
The Web site includes a Web page that has an ObjectDataSource control named ObjectDataSource1.
ObjectDataSource1 interacts with a Web service thatexposes methods for listing and editing instances of a
class named Product.
You add a GridView control named GridView1 to the page, and you specify that GridView1 should use
ObjectDataSource1 as its data source.
You then configure GridView1 to auto-generate fields and to enable editing.
You need to add Dynamic Data behavior to GridView1.
You also must ensure that users can use GridView1 to update Product instances.
Which two actions should you perform? (Each correctanswer presents part of the solution. Choose two.)

A.
Add a DynamicDataManager control to the Web page.

B.
Disable the auto-generated fields on GridView1. Add a DynamicField control for each field of the Product
class.

C.
Add the following code segment to the Application_Start method in the Global.asax.cs file.
DefaultModel.RegisterContext(typeof(System.Web.UI.WebControls.
ObjectDataSource), new ContextConfiguration() {ScaffoldAllTables = true});

D.
Add the following code segment to the Page_Init method of the Web page.
GridView1.EnableDynamicData(typeof(Product));



Leave a Reply 0

Your email address will not be published. Required fields are marked *