70-562 braindump(97 to 112) for client: Apr 2016 Edition

100% Guarantee of 70-562 question materials and practice for Microsoft certification for IT examinee, Real Success Guaranteed with Updated 70-562 pdf dumps vce Materials. 100% PASS TS: MS .NET Framework 3.5, ASP.NET Application Development exam Today!

2016 Apr 70-562 Study Guide Questions:

Q97. You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. 

You plan to create a Web form to validate credit card information. You write the following code fragment for the Web form. 

<script type="text/javascript"> 

function validateCreditCard() { 

vac creditCard = Sget('txtCreditCard').value; 

PageMethods.ValidateCreditCard(creditCard, 

onValidateCreditCardComplete); > 

function onValidateCreditCardComplete(result) 

{ if (Iresult) 

alert('Credit card number is not valid.'); 

document.getElementById('txtCreditCard').focus(); 

</script> 

<asp:ScriptManager runat="server" ID""ScriptManager1" 

EnablePageMethods="true" /> 

<asp:TextBox runat="server" ID="txtCreditCard" onblur="nojavascript...validateCreditCard();" /> 

You need to implement the ValidateCreditCard method in the code-behind page class that validates the credit card number. 

Which code segment should you use? 

A. [ScriptMethod] 

public static bool ValidateCreditCard(string ccNumber) 

bool IsValid = CreditCardAuthority.ValidateCard(ccNumber); 

return isValid; } 

B. [ScriptMethod] 

public bool ValldateCreditCard(string ccNumber) 

bool isValid - CreditCardAuthority.ValidateCard(ccNumber); 

return isValid; 

C. [WebMethod] 

public static bool ValidateCreditCard(string ccNumber) 

bool isValid = CreditCardAuthority.ValidateCard(ccNumber); 

return isValid; 

D. <WebMethod> 

public bool ValidateCreditCard(string ccNumber) 

bool isValid = CreditCardAuthority.ValidateCard(ccNumber); 

return is Valid; 

Answer: D


Q98. You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. 

To add a Calendar server control to a Web page, you write the following code fragment. 

<asp:Calendar SelectionMode="DayWeek" 

ID="Calendar1" runat="server"> 

</asp:Calendar> 

You need to disable the non-week days in the Calendar control. 

What should you do? 

A. Add the following code segment to the Calendar1 DayRender event handler. 

if (e.Day.IsWeekend) { 

B. Day.IsSelectable = false; 

C. Add the following code segment to the Calendar1 DayRender event handler. 

if (e.Day.IsWeekend) { 

if (Calendar1.SelectedDates.Contains(e.Day.Date)) 

Calendar1.SelectedDates.Remove(e.Day.Date); 

D. Add the following code segment to the Calendar1 SelectionChanged event handler. 

List<DateTime> list = new List<DateTime>(); 

foreach (DateTime st in (sender as Calendar).SelectedDates) { 

if (st.DayOfWeek == DayOfWeek.Saturday || 

st.DayOfWeek == DayOfWeek.Sunday) { 

list.Add(st); 

foreach (DateTime dt in list) { 

(sender as Calendar).SelectedDates.Remove(dt); 

E. Add the following code segment to the Calendar1 DataBinding event handler. 

List<DateTime> list = new List<DateTime>(); 

foreach (DateTime st in (sender as Calendar).SelectedDates) { 

if (st.DayOfWeek == DayOfWeek.Saturday || 

st.DayOfWeek == DayOfWeek.Sunday) { 

list.Add(st); 

foreach (DateTime dt in list) { 

(sender as Calendar).SelectedDates.Remove(dt); 

Answer: A


Q99. DRAG DROP 

You are implementing an EditltemTemplate template for a ListView control. The ListView control is bound to a data source that contains fields named SupplierlD and ContactName. 

The EditltemTemplate template includes two TextBox controls. The TextBox controls are named ContactNameTextBox and SupplierlDTextBox. 


Answer: 



Q100. DRAG DROP 

You develop an ASP.NET Web Site project that contains a large number of Web pages. 

You need to create and deploy a single assembly that includes all the server-side code for the project. 

Which actions should you perform in sequence? 

To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order. 


Answer: 


Q101. You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. 

You create a login Web form by using the following code fragment. 

<asp:ScriptManager ID="ScriptManager1" runat="server" /> 

<asp:TextBox runat="server" ID="txtUser" Width="200px" /> 

<asp:TextBox runat="server" ID="txtPassword" Width="200px" /> 

<asp:Button runat="server" ID="btnLogin" Text="Login" OnClientClick="login(); return false;" /> 

When a user clicks the btnLogin Button control, the login() client-side script is called to authenticate the user. The credentials provided in the TextBox controls are used to call the client-side script. 

You also add the following client-script code fragment in the Web form. (Line numbers are included for reference only.) 

01 <script type="text/javascript"> 

02 function login() { 

03 var username = $get('txtUser').value; 

04 var password = $get('txtPassword').value; 

05 

06 // authentication logic. 

07 } 

08 function onLoginCompleted(validCredentials, userContext, 

09 methodName) 

10 { 

11 // notify user on authentication result. 

12 } 

13 

14 function onLoginFailed(error, userContext, methodName) 

15 { 

16 // notify user on authentication exception. 

17 } 

18 </script> 

The ASP.NET application is configured to use Forms Authentication. The ASP.NET AJAX authentication service is activated in the Web.config file. 

You need to ensure that the following workflow is maintained: 

-On successful authentication, the onLoginCompleted clien-script function is called to notify the user. 

-On failure of authentication, the onLoginFailed clien-script function is called to display an error message. 

Which code segment should you insert at line 06? 

A. var auth = Sys.Services.AuthenticationService;auth.login(username, password, false, null, 

null,onLoginCompleted, onLoginFailed, null); 

B. var auth = Sys.Services.AuthenticationService;auth.set_defaultFailedCallback(onLoginFailed); 

var validCredentials = auth.login(username, password, false, null, null, null, null, null); 

if (validCredentials) 

onLoginCompleted(true, null, null); 

else 

onLoginCompleted(false, null, null); 

C. var auth = Sys.Services.AuthenticationService; 

auth.set_defaultLoginCompletedCallback(onLoginCompleted); 

try { 

auth.login(username, password, false, null, null, 

null, null, null); 

catch (err) { 

onLoginFailed(err, null, null); 

D. var auth = Sys.Services.AuthenticationService; 

try { 

var validCredentials = auth.login(username, password, false, null, null, null, null, null); 

if (validCredentials) 

onLoginCompleted(true, null, null); 

else 

onLoginCompleted(false, null, null); 

catch (err) { 

onLoginFailed(err, null, null); } 

Answer: A


70-562 dumps

Avant-garde 70-562 vce:

Q102. You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. 

You host the application on a server named ContosoTest that runs Microsoft IIS 6.0. You set up remote debugging on the ContosoTest server. 

You need to debug the application remotely from another computer named ContosoDev. 

What should you do? 

A. Attach Microsoft Visual Studio.NET to the w3wp.exe process. 

B. Attach Microsoft Visual Studio.NET to the inetinfo.exe process. 

C. Attach Microsoft Visual Studio.NET to the Msvsmon.exe process. 

D. Attach Microsoft Visual Studio.NET to the WebDev.WebServer.exe process. 

Answer: A


Q103. You create a Microsoft ASP.NET Web application by using the Microsoft .NET Framework version 3.5. 

The Web site uses C# as the programming language. You plan to add a code file written in Microsoft VB.NET to the application. This code segment will not be converted to C#. 

You add the following code fragment to the Web.config file of the application. 

<compilation debug="false"> 

<codeSubDirectories> 

<add directoryName="VBCode"/> 

</codeSubDirectories> 

</compilation> 

You need to ensure that the following requirements are met: 

-The existing VB.NET file can be used in the Web application -The file can be modified and compiled at run time 

What should you do? 

A. Create a new class library that uses VB.NET as the programming language. 

Add the VB.NET code file to the class library. Add a reference to the class library in the application. 

B. Create a new folder named VBCode at the root of the application. Place the VB.NET code file in this new folder. 

C. Create a new Microsoft Windows Communication Foundation (WCF) service project that uses VB.NET as the programming language. Expose the VB.NET code functionality through the WCF service. Add a service reference to the WCF service project in the application. 

D. Create a new folder named VBCode inside the App_Code folder of the application. Place the VB.NET code file in this new folder. 

Answer: D


Q104. You are developing an intranet application. Users log on to client computers by using Active Directory credentials. 

The application must meet the following requirements: 

-Allow access by authorized, Active Directory users only. 

-Require the least number of steps for authorized users to access the application. 

You need to secure the Web application. 

What should you do? (More than one answer choice may achieve the goal. Select the BEST answer.) 

A. Enable Forms authentication and implement a Microsoft SQL Server membership provider. 

B. Enable Forms authentication and implement an LDAP membership provider. 

C. Enable Windows authentication. 

D. Create a Windowsldentity object and validate the authentication token within the Page_Init event of each Web page. 

Answer: C


Q105. You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. 

You create a custom-templated server control. 

You need to ensure that the child controls of the server control are uniquely identified within the control hierarchy of the page. 

Which interface should you implement? 

A. the ITemplatable interface 

B. the INamingContainer interface 

C. the IRequiresSessionState interface 

D. the IPostBackDataHandler interface 

Answer: B


Q106. You create and deploy an online forum application that uses ASP.NET membership and roles. The application Web pages include Menu controls that display navigation links retrieved from a file named forum.sitemap. 

Users who are not members of the Moderators role receive an "Access is Denied" message when they attempt to follow links to pages within a restricted folder named Moderators. 

You need to ensure that the Menu controls display navigation links only to pages that the current user is authorized to access. 

What should you do? (More than one answer choice may achieve the goal. Select the BEST answer.) 

A. In the forum.sitemap file, add the roles="?" attribute to entries for Web pages in the Moderators folder. 

B. In the forum.sitemap file, remove entries for Web pages in the Moderators folder. 

C. In the Web.config file, apply the securityTrimmingEnabled="true" attribute to the default site-map provider. 

D. In the constructor for each Web page, add an event handler that handles the SiteMap.SiteMapResolve event. 

Answer: C


70-562 test

Approved 70-562 exam question:

Q107. You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. 

You add a Web form that contains the following code fragment. 

<asp:GridView ID="gvProducts" runat="server" 

AllowSorting="True" DataSourceID="Products"> 

</asp:GridView> 

<asp:ObjectDataSource ID="Products" runat="server" 

SelectMethod="GetData" TypeName="DAL" /> 

</asp:ObjectDataSource> 

You write the following code segment for the GetData method of the DAL class. (Line numbers are included for reference only.) 

01 public object GetData() { 

02 SqlConnection cnn = new SqlConnection( -) 03 string strQuery = "SELECT * FROM Products"; 

05 } 

You need to ensure that the user can use the sorting functionality of the gvProducts GridView control. 

Which code segment should you insert at line 04? 

A. SqlCommand cmd = new SqlCommand(strQuery, cnn); 

cnn.Open(); 

return cmd.ExecuteReader(); 

B. SqlCommand cmd = new SqlCommand(strQuery, cnn); 

cnn.Open(); 

return cmd.ExecuteReader(CommandBehavior.KeyInfo); 

C. SqlDataAdapter da = new SqlDataAdapter(strQuery, cnn); 

DataSet ds = new DataSet(); 

da.Fill(ds); 

return ds; 

D. SqlDataAdapter da = new SqlDataAdapter(strQuery, cnn); 

DataSet ds = new DataSet(); 

da.Fill(ds); 

ds.ExtendedProperties.Add("Sortable", true); 

return ds.Tables[0].Select(); 

Answer: C


Q108. You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. 

You plan to submit text that contains HTML code to a page in the application. 

You need to ensure that the HTML code can be submitted successfully without affecting other applications that run on the Web server. 

What should you do? 

A. Add the following attribute to the @Page directive. 

EnableEventValidation="true" 

B. Add the following attribute to the @Page directive. 

ValidateRequest="true" 

C. Set the following value in the Web.config file. 

<system.web> 

<pages validateRequest="false"/> 

</system.web> 

D. Set the following value in the Machine.config file. 

<system.web> 

<pages validateRequest="false"/> 

</system.web> 

Answer: C


Q109. You create a Microsoft ASP.NET Web application by using the Microsoft .NET Framework version 

3.5. 

You use Windows Authentication for the application. You set up NTFS file system permissions for the Sales group to access a particular file. You discover that all the users are able to access the file. 

You need to ensure that only the Sales group users can access the file. 

What additional step should you perform? 

A. Remove the rights from the ASP.NET user to the file. 

B. Remove the rights from the application pool identity to the file. 

C. Add the <identity impersonate="true"/> section to the Web.config file. 

D. Add the <authentication mode="[None]"> section to the Web.config file. 

Answer: C


Q110. You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. 

The application must redirect the original URL to a different ASPX page. 

You need to ensure that the users cannot view the original URL after the page is executed. 

You also need to ensure that each page execution requires only one request from the client browser. 

What should you do? 

A. Use the Server.Transfer method to transfer execution to the correct ASPX page. 

B. Use the Response.Redirect method to transfer execution to the correct ASPX page. 

C. Use the HttpContext.Current.RewritePath method to transfer execution to the correct ASPX page. 

D. Add the Location: new URL value to the Response.Headers collection. Call the Response.End() statement. Send the header to the client computer to transfer execution to the correct ASPX page. 

Answer: C


Q111. You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. 

You create a Web page that has a GridView control named GridView1. The GridView1 control displays the data from a database named Region and a table named Location. 

You write the following code segment to populate the GridView1 control. (Line numbers are included for reference only.) 

01 protected void Page_Load(object sender, EventArgs e) 

02 { 

03 string connstr; 

04 … 

05 SqlDependency.Start(connstr); 

06 using (SqlConnection connection = 

07 new SqlConnection(connstr)) 

08 { 

09 SqlCommand sqlcmd = new SqlCommand(); 

10 DateTime expires = DateTime.Now.AddMinutes(30); 

11 SqlCacheDependency dependency = new 

12 SqlCacheDependency("Region", "Location"); 

13 Response.Cache.SetExpires(expires); 

14 Response.Cache.SetValidUntilExpires(true); 

15 Response.AddCacheDependency(dependency); 

16 

17 sqlcmd.Connection = connection; 

18 GridView1.DataSource = sqlcmd.ExecuteReader(); 

19 GridView1.DataBind(); 

20 } 

21 } 

You need to ensure that the proxy servers can cache the content of the GridView1 control. 

Which code segment should you insert at line 16? 

A. Response.Cache.SetCacheability(HttpCacheability.Private); 

B. Response.Cache.SetCacheability(HttpCacheability.Public); 

C. Response.Cache.SetCacheability(HttpCacheability.Server); 

D. Response.Cache.SetCacheability(HttpCacheability.ServerAndPrivate); 

Answer: B


Q112. You create a Microsoft ASP.NET AJAX application by using the Microsoft .NET Framework version 3.5. 

You attach Microsoft Visual Studio 2008 debugger to the Microsoft Internet Explorer instance to debug the JavaScript code in the AJAX application. 

You need to ensure that the application displays the details of the client-side object on the debugger console. 

What should you do? 

A. Use the Sys.Debug.fail method. 

B. Use the Sys.Debug.trace method. 

C. Use the Sys.Debug.assert method. 

D. Use the Sys.Debug.traceDump method. 

Answer: D



see more 70-562 - TS: MS .NET Framework 3.5, ASP.NET Application Development

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

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