2016 March NEW 70-515 Exam Questions RELEASED Today!
Exam Code: 70-515
Exam Name: TS: Web Applications Development with Microsoft .NET Framework 4
Certification Provider: Microsoft
Corresponding Certifications: MCPD, MCPD: Web Developer 4, MCTS, MCTS: Microsoft .NET Framework 4, Web Applications
2016 NEW 70-515 Study Guides:
1.Developing web forms pages
2.Developing and using web forms controls
3.Implementing client-side scripting and AJAX
4.Configuring and extending a web application
5.Displaying and manipulating data
6.Developing a web application by using ASP.NET MVC 2
QUESTION 191
You have a C# code snippet with 2 classes, one composed by elements of the other.
Something like
public class Student
{
public string Name {get;set;}
}
public class Supervisor
{
public string name {get;set;}
public List<Student> {get;set;}
}
And a markup code snippet, with 2 repeaters imbricated + a ObjectDataSource retrieving a list of Supervisors, the top level repeater “rptSupervisors” is bound using ObjectDataSourceID to the ObjectDataSource, and the inside one “rptStudents” is not bound yet.
We understand that we need a list of supervisors and sublists of their relative students.
A. bind rptStudents with the list of current item in SupervisorsList using the ItemDataBound
event of the rptStudents repeater
B. bind rptStudents with the list of current item in SupervisorsList using the ItemCommand
event of the rptSupervisor repeater
C. databinding directly the rptStudents in the page load or something dummy like that
(don’t remember exactly)
D. another dummy solution involving a “supervisors have all the same students” situation
Answer: B
QUESTION 192
ASP.net MVC dotn display a column
Using LINQ to SQL class
[MetadataType(typeof(ProductMetadata))]
public pertial class Product
{
…
}
public class ProductMetadata
{
…
}
A. Add the following attribute to Product class
[DisplayColumn(“DiscontinueDate”,”DiscontinueDate”,false)
B. Add the following attribute to ProductMetadata class
[DisplayColumn(“DiscontinueDate”,”DiscontinueDate”,false)
C. Add the following code segment Product class
public bool ScaffoldDisable()
{
return false;
}
D. ProductMetaData class
[ScaffoldColumn(false)]
public object DiscontinueDate;
Answer: D
QUESTION 193
Migration .net 3.5 to 4.0
You have migrated a web application from .net 3.5 to 4.0. the application hat to render same as in .net 3.5.
A. <assembles> someoptions </assembles>
B. <pages controlRenderingCompatibilityVersion=”3.5″/>
C. <compilation targetframework = “3.5” />
D. <xhtmlConformance mode=”Legacy” />
Answer: B
QUESTION 194
A library called contosobuisness.dll has been created and u need to accept it in a page..
all options had the <%assembly tag but the att differed
A. <%assembly TargetName=”contosobuisness” %>
B. <%assembly ID=”contosobuisness” %>
C. <%@ Assembly Name=”contosobuisness” %>
D. <%assembly virtualpath=”contosobuisness” %>
Answer: C
QUESTION 195
A text box should enter valid date options all were compare validators but the operator differed (equal and datatyp)..
controltovalidate in two options and controltocompare in the remainin..
A. <asp:CompareValidator ID=”CompareValidator1″ runat=”server”
Operator=”DataTypeCheck” Type=”Date”></asp:CompareValidator>
B. <asp:CompareValidator ID=”CompareValidator1″ runat=”server”
Operator=”Equal” Type=”Date”></asp:CompareValidator>
C. <asp:CompareValidator ID=”CompareValidator1″ runat=”server”
Operator=”LessThan” Type=”Date”></asp:CompareValidator>
D. <asp:CompareValidator ID=”CompareValidator1″ runat=”server”
Operator=”DataTypeCheck” Type=”Double”></asp:CompareValidator>
Answer: A
QUESTION 196
You have a master page custom.master … u create a nested.master page using it …
and then u have content page that uses the nested.master as its master page …
to get a string prop from custom.master into a label in content page the code u wud use…
A. master.master
B. parent.master
C. this.master
D. unknown
Answer: B
QUESTION 197
You have a login.ascx control and to display it in a view which method u would use..
A. http.display
B. http.partial
C. http.load
D. http.get
Answer: B
QUESTION 198
You are developing a Asp.net web application tht includes a panel control that has ID contentsection.
You need to add a textBox control to the panel control.
A. this.RequireControlState(this.LoadControl(typeof(TextBox),null));
B. this.ContentSection.control.add(this.FindControl(ContentSection.ID + “asp:TextBox”));
C. this.ContentSection.control.add(this.LoadControl(typeof(TextBox),null));
D. this.LoadComplete(“asp:TextBox”).IntiantiateIn(Content Section)
Answer: C
QUESTION 199
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 Private Sub gvModels_RowDataBound(ByVal sender As Object, _
02 ByVal e As GridViewRowEventArgs) _
03 Handles gvModels.RowDataBound
04 If (e.Row.RowType = DataControlRowType.DataRow) Then
05 Dim cm As CarModel =
06 DirectCast(e.Row.DataItem, CarModel)
08 img.ImageUrl =
09 String.Format(“images/{0}.jpg”, cm.ID)
11 End If
12 End Sub
You need to get a reference to the Image named img.
Which code segment should you add at line 07?
A. Dim img As Image =
DirectCast(Page.FindControl(“img”), Image)
B. Dim img As Image =
DirectCast(e.Row.FindControl(“img”), Image)
C. Dim img As Image =
DirectCast(gvModels.FindControl(“img”), Image)
D. Dim img As Image =
DirectCast(Page.Form.FindControl(“img”), Image)
Answer: B
QUESTION 200
You are developing an ASP.NET web application.
The application consumes a WCF service that implements a contract named IcontosoService.
The service is located on the local network and is exposed using the following endpoint
<endpoint name=”udpDiscover” kind=”udpDiscoveryEndpoint”/>
You need to consume the service by using the WS-Discovery protocol.
Which client endpoint configuration should you use?
A. <endpoint name=”contosoEndpoint” address=”oneway-basic”
binding=”basicHttpBinding”contract=”IContosoService”/>
B. <endpoint name=”contosoEndpoint” kind=”dynamicEndpoint”
binding=”wsHttpBinding” contract=”IContosoService”/>
C. <endpoint name=”contosoEndpoint” address=”twoway-basic”
binding=”basicHttpBinding”contract=”IContosoService”/>
D. <endpoint name=”contosoEndpoing” address=”dynamicEndpoint”
binding=”wsHttpBinding” contract=”*”/>
Answer: B
Explanation:
http://msdn.microsoft.com/en-us/library/ee354381.aspx
kind=”dynamicEndpoint” Defines a standard endpoint configured to use WCF Discovery within a WCF client application.
When using this standard endpoint, an address is not required because during the first call, the client will query for a service endpoint matching the specified contract and automatically connect to it for you. By default the discovery query is sent over multicast UDP but you can specify the discovery binding and search criteria to use when you need to.
http://msdn.microsoft.com/en-us/library/ms731762.aspx
contract=”IContosoService” Required string attribute.
A string that indicates which contract this endpoint is exposing.
The assembly must implement the contract type.
QUESTION 201
You are developing an ASP.NET web page.
You need to ensure that content flows from right to left.
What should you do?
A. In the @Page directive, add an attribute named dir with a value of “RightToLeft”
B. In the @Page directive, add an attribute named dir with a value of “RTL”
C. In the <html> tag, add an attribute named dir with a value of “RTL”
D. In the <html> tag, add an attribute named dir with a value of “RightToLeft”
Answer: C
Explanation:
http://msdn.microsoft.com/en-us/library/twe16yc2%28v=vs.100%29.aspx
QUESTION 202
You are implementing an ASP.NET web page that contains a ScriptManager control.
You need to ensure that only the required Microsoft AJAX Framework Javascript files are loaded.
A. Set the AjaxFrameworkMode property of the ScriptManager to Enabled, and reference each
javascript file by adding a ScriptReference for each required file.
B. Set the AjaxFrameworkMode property of the ScriptManager to Explicit, and reference each
JavaScript file by adding a ScriptReference for each required file.
C. Set the AjaxFrameworkMode property of the ScriptManager to Disabled, and reference each
JavaScript file by adding a ScriptReference for each required file.
D. Set the AjaxFrameworkMode property of the ScriptManager to Enabled, and manually add a
reference to each required JavaScript file to the HTML page head element.
Answer: B
Explanation:
http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanager.ajaxframeworkmode.aspx
QUESTION 203
You are developing an ASP.NET MVC 2 Web application that displays product details.
The global.asax.cs file contains the following code segment
01 public static void registerRoutes(RouteCollection routes)
02 {
03 routes.IgnoreRoute(“{resource}.axd/{*pathInfo}”);
04 routes.MapRoute(“Default”, “{controller}/{action}/{id}”, new {controller = “Home”, action = “index”, id = UrlParameter.Optional});
05 }
The URL “/products/PRODUCTNAME”, where PRODUCTNAME is the name of the product, must give details for the product that is stored in a Microsoft SQL Server database.
You need to ensure that the routes are registered correctly.
What should you do?
A. Replace line 04 with the following code segment routes.
MapRoute(“products/{productName},
“ProductDetails”, new {controller = “Products”,
action = “index”,productName = UrlParameter.Optional});
B. Add the following code segment between lines 04 and 05 routes.
MapRoute(“ProductDetails,
“products/{productName}”, new {controller = “Products”,
actions=”index”,productName = UrlParameter.Optional});
C. Replace lines 03 and 04 with the following code segment routes.
MapRoute(“products/{productName}”,
“ProductDetails”, new {controller =”Products”,
action=”Index”,productName=UrlParameter.Optional});
D. Add the following code segment between lines 03 and 04. routes.
MapRoute(“ProductDetails”,
“products/{productName}”, new {controller=”products”,
action =”Index”,productName = UrlParameter.Optional});
Answer: D
Explanation:
ASP.NET MVC checks incoming URL requests against routes in the order they were registered, so you need to add them in the order of most to least specific. http://richarddingwall.name/2008/08/09/three-common-aspnet-mvc-url-routing-issues/
QUESTION 204
You are implementing an ASP.NET Web page.
You need to add a text box that allows only values between 1 and 10, inclusive, to be submitted.
Which two code segments should you use? (Each correct answer presents part of the solution. Choose two.)
A. <script type=”text/javascript”>
function validate_value(obj, args)
{
return (args.Value >= 1 && args.Value <= 10);
}
</script>
B. <script type=”text/javascript”>
function validate_value(obj, args)
{
args.IsValid = (args.Value >= 1 && args.Value <= 10);
}
</script>
C. <asp:TextBox ID=”txt1″ runat=”server” />
<asp:CustomValidator ID=”val1″ runat=”server”
ControlToValidate=”txt1″
ClientValidationFunction=”validate_value”
ErrorMessage=”Value invalid” />
D. <asp:TextBox ID=”txt1″ runat=”server”
onChange=”validate_value(this, args)” />
Answer: BC
2016 NEW 70-515 Exam Questions & 70-515 Exam Dumps 299q Free Shared By Braindump2go:http://www.braindump2go.com/70-515.html