PrepAway - Latest Free Exam Questions & Answers

Tag: Exam 70-515 (update October 26th, 2015)

Exam 70-515: TS: Web Applications Development with Microsoft .NET Framework 4 (update October 26th, 2015)

Which code segment should you use?

You are creating an ASP.NET Web site. You create a HTTP module named CustomModule, and you
register the module in the web.config file. The CustomModule class contains the following code.
public class CustomModule : IHttpModule
{
string footerContent = “<div>Footer Content</div>”;
public void Dispose( ) {}
}
You need to add code to CustomModule to append the footer content to each processed ASP.NET
page.
Which code segment should you use?

Which method of the FieldTemplateUserControl class should you override in the BooleanField class?

You are developing an ASP.NET Dynamic Data Web application. Boolean fields must display as Yes or
No instead of as a check box. You replace the markup in the default Boolean field template with the
following markup.
<asp:Label runat=”server” ID=”label” />
You need to implement the code that displays Yes or No. Which method of the
FieldTemplateUserControl class should you override in the BooleanField class?

You need to configure the ObjectDataSource control to pass the value of the pid field to GetProductsByProductI

You are implementing an ASP.NET page. You add and configure the following ObjectDataSource.

The page will be called with a query string field named pid. You need to configure the
ObjectDataSource control to pass the value of the pid field to GetProductsByProductId method.
What should you do?

Which code segment should you use?

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?

You need to display the items in a table named Products by using a custom layout

You are implementing an ASP.NET Dynamic Data Web site. The Web site includes a data context that
enables automatic scaffolding for all tables in the data model. The Global.asax.cs file contains the
following code segment.
public static void RegisterRoutes(RouteCollection routes) {
{
routes.Add(new DynamicDataRoute(“{table}/ListDetails.aspx”)
{
Action = PageAction.List,
ViewName = “ListDetails”,
Model = DefaultModel
});
routes.Add(new DynamicDataRoute(“{table}/ListDetails.aspx”)
{
Action = PageAction.Details,
ViewName = “ListDetails”,
Model = DefaultModel
});
}
You need to display the items in a table named Products by using a custom layout. What should you
do?

Which two actions should you perform?

You are developing an ASP.NET Web service. The following code segment implements the service.
(Line numbers are included for reference only.)
01 [WebServiceBinding(ConformsTo =
WsiProfiles.BasicProfile1_1)]
02 public class ProductService :
System.Web.Services.WebService
03 {
04 [WebMethod]
05 public Product GetProduct(string name)
06 {
07
08 }
09
10 [WebMethod]
11 public Product GetProduct(int id)
12 {
13
14 }
15 }
You need to ensure that both GetProduct methods can be called from a Web client. Which two
actions should you perform? (Each correct answer presents part of the solution. Choose two.)


Page 11 of 26« First...910111213...20...Last »