15 tips on msdn 70-515

Exam Code: 70-515 (Practice Exam Latest Test Questions VCE PDF)
Exam Name: TS: Web Applications Development with Microsoft .NET Framework 4
Certification Provider: Microsoft
Free Today! Guaranteed Training- Pass 70-515 Exam.

2016 Apr 70-515 Study Guide Questions:

Q136. You are implementing an ASP.NET page that includes a text box. 

You need to validate values that are typed by users to ensure that only numeric values are submitted. 

Which control markup should you use? 

A. <asp:TextBox ID="txt1" runat="server" 

CausesValidation="true" 

ValidationGroup="Numeric" /> 


B. <asp:TextBox ID="txt1" runat="server" 

EnableClientScript="true" 

ValidationGroup="Numeric" /> 


C. <asp:TextBox ID="txt1" runat="server" /> 

<asp:RegularExpressionValidator ID="val1" 

runat="server" 

ControlToValidate="txt1" 

ValidationExpression="[0-9]*" 

ErrorMessage="Invalid input value" /> 


D. <asp:TextBox ID="txt1" runat="server" /> 

<asp:RegularExpressionValidator ID="val1" 

EnableClientScript="true" ControlToValidate="txt1" 

ValidationExpression="[0-9]*" 

ErrorMessage="Invalid input value" /> 


Answer: C 


Q137. Which tool is used to simplify the migration, management and deployment of IIS Web servers, Web applications and Web sites? 

A. System Designer 

B. XCOPY deployment 

C. Deployment Designer 

D. Web Deployment 

Answer: D 


Q138. You are implementing an ASP.NET Web application that retrieves data from a Microsoft SQL Server database. You add a page that includes the following data source control. 

<asp:SqlDataSource id="sqlds" runat="server" ConnectionString="<%$ ConnectionStrings:MyDB %>" SelectCommand="SELECT * FROM Companies" /> 

The page is accessed frequently, but the data in the database rarely changes. You need to cache the retrieved data so that the database is not queried each time the Web page is accessed. 

What should you do? 

A. Add the following attributes to the SqlDataSource control. 

DataSourceMode="DataSet" 

EnableCaching="True" 

CacheDuration="120" 


B. Add the following attributes to the SqlDataSource control. 

DataSourceMode="DataReader" 

EnableCaching="True" 

CacheDuration="120" 


C. Add the following configuration to the <system.web/> section of the web.config file. 


<caching> 

<sqlCacheDependency enabled="true"> 

<databases> 

<add name="MyDBCache" connectionStringName="MyDB" pollTime="120" /> 

</databases> 

</sqlCacheDependency> 

</caching> 


D. Add the following configuration to the <system.web/> section of the web.config file. 

<caching> 

<sqlCacheDependency enabled="true" pollTime="120"> 

<databases> 

<add name="MyDBCache" connectionStringName="MyDB" /> 

</databases> 

</sqlCacheDependency> 

</caching> 


Answer: A 


Q139. You are implementing an ASP.NET Web site that uses a custom server control named Task. Task is defined as shown in the following list. 

.Class name: Task 

.Namespace: DevControls 

.Assembly: TestServerControl.dll 

.Base class: System.Web.UI.WebControls.WebControl 

You copy TestServerControl.dll to the Web sites Bin folder. 

You need to allow the Task control to be declaratively used on site pages that do not contain an explicit @ Register directive. 

Which configuration should you add to the web.config file? 

A. <appSettings> 

<add key="Dev:Task" 

value="DevControls, DevControls.Task"/> 

</appSettings> 


B. <compilation targetFramework="4.0" explicit="false"> 

<assemblies> 

<add assembly="TestServerControl" /> 

</assemblies> 

</compilation> 


C. <pages> 

<controls> 

<add assembly="TestServerControl" namespace="DevControls" 

tagPrefix="Dev"/> 

</controls> 

</pages> 


D. <pages> 

<tagMapping> 

<add tagType="System.Web.UI.WebControls.WebControl" 

mappedTagType="DevControls.Task"/> 

</tagMapping> 

</pages> 


Answer: C 


Q140. 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 MVC 2 Web application using .NET Framework 4.0. 


You implement a single project area in the MVC 2 Web application. 

In the Areas folder, you add a subfolder named MyTest. 

You add the following files to the appropriate sub-folders: 


MyController. cs 

MyHome.aspx 


You register a route of the area, setting the route name to MyTest_default and the area 

name to test. 

You create a view named MyViews.aspx that is outside the test area. 

You need to add a link to MyViews.aspx that points to MyHome.aspx. 


Which of the following code segments will you use? 


A. <%= Html.ActionLink("MyTest", "MyHome", new {area = "test"}, null)%> 

B. <%= Html.RouteLink("MyHome", "MyTest", new {area = "test"}, null)%> 

C. <%= Html.RouteLink("MyTest", "MyHome", "MyTest", new {area = "test"}, null)%> 

D. <%= Html.ActionLink("MyTest", "MyHome", "MyTest", new {area = "test"}, null)%> 

Answer: D 


70-515 actual exam

Abreast of the times mcts 70-515 practice test:

Q141. 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 Web application connects to a SQL Server database. 

You use the ADO.NET Entity Framework to handle persistence-ignorant entities. 

You create an ObjectContext object named ObjContext. 

Subsequently, you change properties on numerous entities. 

You are required to save the changed entity values in the SQL Server database. 

Which of the following code segments will you use? 

A. ObjContext.SaveChanges(SaveOptions.DetectChangesBeforeSave); 

B. ObjContext.SaveChanges(SaveOptions.AcceptAllChangesAfterSave); 

C. ObjContext.SaveChanges(SaveOptions.All); 

D. ObjContext.SaveChanges(SaveOptions.None); 

Answer: A 


Q142. You create a Web page named TestPage.aspx and a user control named TestUserControl. ascx. TestPage.aspx uses TestUserControl.ascx as shown in the following line of code. 

<uc:TestUserControl ID="testControl" runat="server"/> On TestUserControl.ascx, you need to add a read-only member named CityName to return the value "New York". You also must add code to TestPage.aspx to read this value. 

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.) 

A. Add the following line of code to the TestUserControl.ascx.vb code-behind file. 

Public ReadOnly Property CityName As String 

Get 

Return "New York" 

End Get 

End Property 


B. Add the following line of code to the TestUserControl.ascx.vb code-behind file. 

Protected ReadOnly CityName As String = "New York" 


C. Add the following code segment to the TestPage.aspx.vb code-behind file. 

Protected Sub Page_Load(ByVal sender As Object, 

ByVal e As System.EventArgs) Handles Me.Load 

Dim s As String = testControl.CityName 

End Sub 


D. Add the following code segment to the TestPage.aspx.vb code-behind file. 

Protected Sub Page_Load(ByVal sender As Object, 

ByVal e As System.EventArgs) Handles Me.Load 

Dim s As String = testControl.Attributes("CityName") 

End Sub 


Answer: AC 


Q143. You are implementing an ASP.NET page that will retrieve large sets of data from a data source. You add a ListView control and a DataPager control to the page. 

You need to ensure that the data can be viewed one page at a time. 

What should you do? 

A. Set the DataPager control's PageSize property to the number of rows to view at one time. 

B. Set the DataPager control's PagedControlID property to the ID of the ListView control. 

C. In the codebehind file, set the DataPager control's Parent property to the ListView control. 

D. In the codebehind file, set the ListView control's Parent property to the DataPager control. 

Answer: B 


Q144. You are creating an ASP.NET Web site. The site is configured to use Membership and Role management providers. 

You need to check whether the currently logged-on user is a member of a role named Administrators. 

Which code segment should you use? 

A. Dim isMember As Boolean = 

Roles.GetUsersInRole ("Administrators").Any() 


B. Dim isMember As Boolean = 

Membership.ValidateUser ( User.Identity.Name , "Administrators") 


C. Dim isMember As Boolean = 

Roles.GetRolesForUser ("Administrators").Any () 


D. Dim isMember As Boolean = User.IsInRole ("Administrators") 


Answer: D 


Q145. You have a master page custom.master. 

You create a nested.master page using it. 

You then have a content page that uses the nested.master as its master page. 

Which code would you use to get a string property from custom.master? 

A. master.master 

B. parent.master 

C. this.master 

D. unknown 

Answer: B 


70-515 question

Download mcts exam 70-515 pdf:

Q146. You are implementing an ASP.NET application that will use session state in out-of-proc mode. You add the following code. 

Public Class Person 

Public Property FirstName As String 

Public Property LastName As String 

End Class 

You need to add an attribute to the Person class to ensure that you can save an instance to session state. Which attribute should you use? 

A. Bindable 

B. Serializable 

C. DataContract 

D. DataObject 

Answer: B 


Q147. 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 will provide information about products manufactured by the company. 

The company has a branch office in Saudi Arabia. 

The Sales department employees of the branch office in Saudi Arabia will use the 


application. 

You are required to accomplish the following tasks: 


The application displays contents in the correct format for the employees of the Saudi Arabia office. 

Each page in the application is displayed in the right-to-left format. 

What will you do to accomplish these tasks? 

(Each correct answer represents a part of the solution. Choose two.) 


A. In the Web.config file of the Web application, set the culture attribute of the <globalization> element to "ar-SA". 

B. In the Web.config file of the Web application, set the uiCulture attribute to "ar-SA". 

C. In the Web.config file of the Web application, set the culture attribute to "SA". 

D. In the Web.config file of the Web application, set the culture attribute of the <globalization> element to "ar". 

E. Set the HTML dir attribute for the <body> element of each page to "rfl". 

Answer: AE 


Q148. You have created an ASP.NET server control named ShoppingCart for use by other developers. Some developers report that the ShoppingCart control does not function properly with ViewState disabled. You want to ensure that all instances of the ShoppingCart control work even if ViewState is disabled. What should you do? 

A. Require developers to set EnableViewStateMac to true. 

B. Store state in ControlState instead of ViewState. 

C. Serialize the state into an Application state entry called "MyControl". 

D. Require developers to change the session state mode to SQLServer. 

Answer: B 


Q149. You are implementing an ASP.NET page that includes the following down list. 


You need to dynamically add values to the end of the drop-down list. 

What should you do? 

A. Add the following OnPreRender event handler to the asp:DropDownList 

protected void MyDropDown_PreRender(object sender, EventArgs e) 

DropDownList ddl = sender as DropDownList; 

Label lbl = new Label(); 

lbl.Text = "Option"; 


lbl.ID = "Option"; ddl.Controls.Add(lbl); } 

B. Add the following OnPreRender event handler to the asp:DropDownList 

protected void MyDropDown_PreRender(object sender, EventArgs e) 

DropDownList ddl = sender as DropDownList; 

ddl.Items.Add("Option"); 


C. Add the following event handler to the page code-behind. 

protected void Page_LoadComplete(object sender, EventArgs e) 

DropDownList ddl = Page.FindControl("MyDropDown") as DropDownList; 

Label lbl = new Label(); 

lbl.Text = "Option"; 

lbl.ID = "Option"; 

ddl.Controls.Add(lbl); 


D. Add the following event handler to the page code-behind. 

protected void Page_LoadComplete(object sender, EventArgs e) 

DropDownList ddl = Page.FindControl("MyDropDown") as DropDownList; 

ddl.Items.Add("Option"); 


Answer: B 


Q150. You are implementing an ASP.NET application that will use session state in out-of-proc mode. You add the following code. 

public class Person { public string FirstName { get; set;} public string LastName { get; set;} } 

You need to add an attribute to the Person class to ensure that you can save an instance to session state. 

Which attribute should you use? 

A. Bindable 

B. DataObject 

C. Serializable 

D. DataContract 

Answer: C 



see more http://www.certshared.com/exam/70-515/

Microsoft 70-515 Certification Sample Questions and Answers: http://www.braindumpsall.net/70-515-dumps/

P.S. New 70-515 dumps PDF: http://www.4easydumps.com/70-515-dumps-download.html