070-515 無料問題集「Microsoft TS: Web Applications Development with Microsoft .NET Framework 4」
You are implementing an ASP.NET page.
Client-side script requires data.
Your application includes a class named Person with a Name property of type string.
The code-behind file of the page includes the following code segment.
public string JsonValue;
List<Person> people = GetPeopleList();
JavaScriptSerializer json = new JavaScriptSerializer();
You need to use the JavaScriptSerializer class to serialize only the Name property of each item in the
people list.
Which code segment should you use?
Client-side script requires data.
Your application includes a class named Person with a Name property of type string.
The code-behind file of the page includes the following code segment.
public string JsonValue;
List<Person> people = GetPeopleList();
JavaScriptSerializer json = new JavaScriptSerializer();
You need to use the JavaScriptSerializer class to serialize only the Name property of each item in the
people list.
Which code segment should you use?
正解:C
解答を投票する
You are implementing an ASP.NET web application.The application defines the following classes. public class Person {
public String Name{get; set;} publicIList<Address> Addresses{get;set;} }
public class Address
{ public String AddressType{get; set;} public string AddressValue{get;set;}
}
The applicaction must generate XML from personList, wich is a collection of Person instances.The following
XML is an example of the schema than the generated XML must use.
<Persons>
<Person Name="John Doe">
<Address Email="[email protected]"/>
<Address AlternativeEmail="[email protected]"/>
<Address MSNInstanceMessenger="[email protected]"/>
</Person>
.....
</Persons>
You need to generate the XML.
Wich code segment should you use?
public String Name{get; set;} publicIList<Address> Addresses{get;set;} }
public class Address
{ public String AddressType{get; set;} public string AddressValue{get;set;}
}
The applicaction must generate XML from personList, wich is a collection of Person instances.The following
XML is an example of the schema than the generated XML must use.
<Persons>
<Person Name="John Doe">
<Address Email="[email protected]"/>
<Address AlternativeEmail="[email protected]"/>
<Address MSNInstanceMessenger="[email protected]"/>
</Person>
.....
</Persons>
You need to generate the XML.
Wich code segment should you use?
正解:B
解答を投票する
You work as an ASP.NET Web Application Developer for SomeCompany.
The company uses Visual Studio .NET 2010 as its application development platform.
You create an ASP.NET Web application using .NET Framework 4.0.
The application has an ASP.NET page.
The page contains a method named GetCustomerOrderData that returns a DataSet.
GetCustomerOrderData contains two DataTable objects named CustomerDetails and OrderDetails,
respectively.
You are required to display the data in OrderDetails in a DetailsView named ViewDetail.
Choose the appropriate steps in the correct order to accomplish this.
Build List and Reorder:

The company uses Visual Studio .NET 2010 as its application development platform.
You create an ASP.NET Web application using .NET Framework 4.0.
The application has an ASP.NET page.
The page contains a method named GetCustomerOrderData that returns a DataSet.
GetCustomerOrderData contains two DataTable objects named CustomerDetails and OrderDetails,
respectively.
You are required to display the data in OrderDetails in a DetailsView named ViewDetail.
Choose the appropriate steps in the correct order to accomplish this.
Build List and Reorder:

正解:

You are implementing an ASP.NET application that uses data-bound GridView controls in multiple pages. You add JavaScript code to periodically update specific types of data items in these GridView controls. You need to ensure that the JavaScript code can locate the HTML elements created for each row in these GridView controls, without needing to be changed if the controls are moved from one page to another. What should you do?
正解:A
解答を投票する
You are developing an ASP.NET MVC 2 Web Application that displays daily blog posts.
Visitors access a blog post page by using a Web address to pass in the year, month, and day -for example,
contoso.com/2010/07/20.
The application must register the appropriate route to use the Display action of the blog controller.
Only page visits with a four digit year, two-digit month and two-digit dat can be passed to the action.
You need to ensure that the route is registered correctly,
Which code segment should you add?
Visitors access a blog post page by using a Web address to pass in the year, month, and day -for example,
contoso.com/2010/07/20.
The application must register the appropriate route to use the Display action of the blog controller.
Only page visits with a four digit year, two-digit month and two-digit dat can be passed to the action.
You need to ensure that the route is registered correctly,
Which code segment should you add?
正解:C
解答を投票する
You are preparing to deploy an ASP.NET application to a production server by publishing the application in
Release configuration.
You need to ensure that the connection string value that is stored in the web.config file is updated to the
production server's connection string value during publishing.
What should you do?
Release configuration.
You need to ensure that the connection string value that is stored in the web.config file is updated to the
production server's connection string value during publishing.
What should you do?
正解:B
解答を投票する
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 that exposes 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 correct answer presents part of the solution. Choose two.)
The Web site includes a Web page that has an ObjectDataSource control named ObjectDataSource1.
ObjectDataSource1 interacts with a Web service that exposes 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 correct answer presents part of the solution. Choose two.)
正解:A、D
解答を投票する