live chatMcAfee Secure sites help keep you safe from identity theft, credit card fraud, spyware, spam, viruses and online scams
Pass4Test 10%OFF Discount Code

Microsoft TS: Web Applications Development with Microsoft .NET Framework 4 - 070-515 Exam Questions

QUESTION NO: 1
You create a page in an ASP.NET Web application.
The page retrieves and displays data from a Microsoft SQL Server database.
You need to create a data source that can connect to the database.
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution.
Choose two.)
Correct Answer: C,D
QUESTION NO: 2
You create an ASP.NET MVC 2 Web application.
You implement a single project area in the application.
In the Areas folder, you add a subfolder named Test.
You add files named TestController.cs and Details.aspx to the appropriate subfolders.
You register the area's route, setting the route name to test_default and the area name to test.
You create a view named Info.aspx that is outside the test area.
You need to add a link to Info.aspx that points to Details.aspx.
Which code segment should you use?
Correct Answer: C
QUESTION NO: 3
You create a Web page that contains drop-down menus that are defined by using div tags in the following code.
<div class="dropdown-menu"> <div class="menu-title">Menu One</div> <div class="menu-items" style="display:none;">
<div><a href="#">Item One</a></div>
<div><a href="#">Item Two</a></div>
</div> </div> <div class="dropdown-menu">
<div class="menu-title">Menu Two</div>
<div class="menu-items" style="display:none;">
<div><a href="#">Item Three</a></div>
<div><a href="#">Item Four</a></div>
</div> </div>
You need to write a JavaScript function that will enable the drop-down menus to activate when the user
positions the mouse over the menu title.
Which code segment should you use?
Correct Answer: B
QUESTION NO: 4
You work as an ASP.NET Web Application Developer for SomeCompany.
The company uses Visual Studio .NET 2010 as its application development platform.
You are creating an ASP.NET Web application using .NET Framework 4.0.
The application holds a Web page named MyHome.aspx.
You are creating a button with a rolloverimage on MyHome.aspx.
However, when mouse hovered over the button image, the rolloverimage is retrieved from the server in a
separate request.
You need to use an improved rollover button in which the button's rolloverimage is already downloaded and
stored in the browser's cache, as a result when you hover over the button, it is instantly displayed.
What will you do to accomplish this?
(Each correct answer represents a part of the solution. Choose two.)
Correct Answer: B,D
QUESTION NO: 5
You are implementing an ASP.NET Web page
The page includes several controls, but only a GridView requires view state. You set the GridView...
You need to ensure that the page will omit unneeded view state.
Wich @ Page directive should you use?
Correct Answer: D
QUESTION NO: 6
You are developing an ASP.NET Web page. The page contains the following markup.
<asp:GridView ID="gvModels" runat="server" onrowdatabound="gvModels_RowDataBound" AutoGenerateColumns="false">
<Columns>
<asp:BoundField DataField="Name" HeaderText="Model" />
<asp:TemplateField>
<ItemTemplate> <asp:Image ID="img" runat="server" /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView>
The pages code-behind file includes the following code segment. (Line numbers are included for reference only.)
01 protected void gvModels_RowDataBound(object sender, GridViewRowEventArgs e)
02 {
03 if (e.Row.RowType == DataControlRowType.DataRow)
04 {
05 CarModel cm = (CarModel)e.Row.DataItem;
06
07 img.ImageUrl = String.Format("images/{0}.jpg", cm.ID);
08 09 } 10 }
You need to get a reference to the Image named img. Which code segment should you add at line 06?
Correct Answer: C
QUESTION NO: 7
You are implementing an ASP.NET Web site. The site contains the following class.
public class Address
{ public int AddressType; public string Line1; public string Line2; public string City; public string ZipPostalCode;
}
The Web site interacts with an external data service that requires Address instances to be given in the following XML format.
<Address AddressType="2"> <Line1>250 Race Court</Line1> <City>Chicago</City> <ZipCode>60603</ZipCode>
</Address>
You need to ensure that Address instances that are serialized by the XmlSerializer class meet the XML
format requirements of the external data service.
Which two actions should you perform (Each correct answer presents part of the solution. Choose two.)
Correct Answer: A,D
QUESTION NO: 8
State management
You have to store user data of 200 KB in an object.
Which state management technique to use:
Correct Answer: D
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 9
You are implementing an ASP.NET MVC 2 Web application that allows users to view and edit data.
You need to ensure that only logged-in users can access the Edit action of the controller.
What are two possible attributes that you can add to the Edit action to achieve this goal? (Each correct
answer presents a complete solution. Choose two.)
Correct Answer: A,B
QUESTION NO: 10
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.)
Correct Answer: B,C