Top 16 secret 70-562 for IT engineers (33 to 48)

Download of 70-562 exam cost materials and resource for Microsoft certification for IT specialist, Real Success Guaranteed with Updated 70-562 pdf dumps vce Materials. 100% PASS Today!

2016 Mar 70-562 Study Guide Questions:

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

A JavaScript code segment in the AJAX application does not exhibit the desired behavior. Microsoft Internet Explorer displays an error icon in the status bar but does not prompt you to debug the script. 

You need to configure the Internet Explorer to prompt you to debug the script. 

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

A. Clear the Disable Script Debugging (Other) check box. 

B. Clear the Disable Script Debugging (Internet Explorer) check box. 

C. Select the Show friendly HTTP error messages check box. 

D. Select the Enable third-party browser extensions check box. 

E. Select the Display a notification about every script error check box. 

Answer: BE


Q34. You create a Microsoft ASP.NET Web application named WebApp1 by using the Microsoft .NET Framework version 3.5. 

The application uses client-side scripts and server-side controls. 

You plan to deploy the application to a Web server that runs the ASP.NET Framework version 1.1. You need to ensure that the Web server is properly configured for the new application. You also need to ensure that the existing applications remain unaffected. 

What should you do? 

A. Execute the aspnet_regiis –s W3SVC/1/Root/WebApp1 command. 

B. Execute the aspnet_regiis –ir command. 

C. Execute the aspnet_regiis –i command. 

D. Execute the aspnet_regiis –sn W3SVC/1/Root/WebApp1 command. 

Answer: B


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

You create a Web page to display photos and captions. The caption of each photo in the database can be modified by using the application. 

You write the following code fragment. 

<asp:FormView DataSourceID="ObjectDataSource1" DataKeyNames="PhotoID" runat="server"> 

<EditItemTemplate> <asp:TextBox Text='<%# Bind("Caption") %>' runat="server"/> <asp:Button Text="Update" CommandName="Update" 

runat="server"/> 

<asp:Button Text="Cancel" CommandName="Cancel" runat="server"/> </EditItemTemplate> <ItemTemplate> <asp:Label Text='<%# Eval("Caption") %>' runat="server" /> <asp:Button Text="Edit" CommandName="Edit" runat="server"/> 

</ItemTemplate> </asp:FormView> 

When you access the Web page, the application throws an error. 

You need to ensure that the application successfully updates each caption and stores it in the database. 

What should you do? 

A. Add the ID attribute to the Label control. 

B. Add the ID attribute to the TextBox control. 

C. Use the Bind function for the Label control instead of the Eval function. 

D. Use the Eval function for the TextBox control instead of the Bind function. 

Answer: B


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

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

<asp:TextBox runat="server" ID="txtSearch" /> 

<asp:Button runat="server" ID="btnSearch" Text="Search" 

?OnClick="btnSearch_Click" /> 

<asp:GridView runat="server" ID="gridCities" /> 

You write the following code segment in the code-behind file. (Line numbers are included for reference only.) 

01 protected void Page_Load(object sender, EventArgs e) 

02 { 

03 DataSet objDS = new DataSet(); 

04 SqlDataAdapter objDA = new SqlDataAdapter(objCmd); 

05 objDA.Fill(objDS); 

06 gridCities.DataSource = objDs; 

07 gridCities.DataBind(); 

08 Session["ds"] = objDS; 

09 } 

10 protected void btnSearch_Click(object sender, EventArgs e) 

11 { 

13 } 

You need to ensure that when the btnSearch Button control is clicked, the records in the gridCities GridView control are filtered by using the value of the txtSearch TextBox. 

Which code segment you should insert at line 12? 

A. DataSet ds = gridCities.DataSource as DataSet; 

DataView dv = ds.Tables[0].DefaultView; 

dv.RowFilter = "CityName LIKE '" + txtSearch.Text + "%'"; 

gridCities.DataSource = dv; 

gridCities.DataBind(); 

B. DataSet ds = Session["ds"] as DataSet; 

DataView dv = ds.Tables[0].DefaultView; 

dv.RowFilter = "CityName LIKE '" + txtSearch.Text + "%'"; 

gridCities.DataSource = dv; 

gridCities.DataBind(); 

C. DataTable dt = Session["ds"] as DataTable; 

DataView dv = dt.DefaultView; 

dv.RowFilter = "CityName LIKE '" + txtSearch.Text + "%'"; 

gridCities.DataSource = dv; 

gridCities.DataBind(); 

D. DataSet ds = Session["ds"] as DataSet; 

DataTable dt = ds.Tables[0]; 

DataRow[] rows = dt.Select("CityName LIKE '" + txtSearch.Text + "%'"); 

gridCities.DataSource = rows; 

gridCities.DataBind(); 

Answer: B


Q37. You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create an ASP.NET AJAX-enabled Web form. You add the following code fragment to the Web form. (Line numbers are included for reference only.) 

01<asp:UpdatePanel runat="server" ID="updPanel1" 

02 UpdateMode="Conditional"> 

03 <ContentTemplate> 

04 <asp:UpdatePanel runat="server" ID="updPanel2" 

05 UpdateMode="Conditional"> 

06 <ContentTemplate> 

07 <asp:UpdateProgress runat="server" 

08 ID="upr2" > 

09 <ProgressTemplate> 

10 <img src="loading_gif_2.gif" /> 

11 </ProgressTemplate> 

12 </asp:UpdateProgress> 

13 

14 </ContentTemplate> 

15 </asp:UpdatePanel> 

16 

17 </ContentTemplate> 

18</asp:UpdatePanel> 

19<asp:UpdateProgress runat="server" ID="upr1" > 

20 <ProgressTemplate> 

21 <img src="loading_gif_1.gif" /> 

22 </ProgressTemplate> 23</asp:UpdateProgress> 

You need to ensure that the following requirements are met: 

-When the updPanel1 UpdatePanel control is updated, the loading_gif_1.gif image is displayed to indicate the loading status. 

-When the updPanel2 UpdatePanel control is updated, both the loading_gif_1.gif and the loading_gif_2.gif images are displayed to indicate the loading status. 

What should you do? 

A. Move the code in lines 19 through 23 to line 16. 

B. Add the AssociatedUpdatePanelID="updPanel1" attribute to the upr1 UpdateProgress control. 

C. Add the AssociatedUpdatePanelID="updPanel2" attribute to the upr2 UpdateProgress control. 

D. Move the code in lines 19 through 23 to line 13. Add the AssociatedUpdatePanelID="updPanel1" attribute to the upr1 UpdateProgress control. 

Answer: C


70-562 vce

Refresh 70-562 exam prep:

Q38. You are developing a custom grid Web control that you will share with other developers. 

You need to ensure that the control property values are always available after a postback. 

Where should the Web control store the property values? (More than one answer choice may achieve the goal. Select the BEST answer.) 

A. in a Session variable 

B. in Control state 

C. in View state 

D. in an Application variable 

Answer: B


Q39. DRAG DROP 

A Web application contains the following class: 

public class Product 

public int ProductlD { get; set; } 

public int CategorylD { get; set; } 

public string ProductNaroe { get; set; } 

public decimal UnitPrice { get; set; } 

The application also contains a method named GetProducts() that returns an IEnumerable<Product> instance. 

You create a new Web page and add a DropDownList control named DropDownListl to the page. 

You have the following requirements: 

-The DropDownList control must be bound to the IEnumerable<Product> instance and must display all product names. 

-When a user selects a product in the DropDownList control, the value of the selected item must be the ProductlD of the corresponding product. 

You need to meet the requirements. 

How should you complete the code segment? 

To answer, drag the appropriate property or properties to the correct location or locations in the answer area. 


Answer: 



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

The application allows users to post comments to a page that can be viewed by other users. 

You add a SqlDataSource control named SqlDS1. You write the following code segment. (Line numbers are included for reference only.) 

01 private void SaveComment() 

02 { 

03 string ipaddr; 

04 

05 SqlDS1.InsertParameters["IPAddress"].DefaultValue = ipaddr; 

06 ... 

07 SqlDS1.Insert(); 

08 } 

You need to ensure that the IP Address of each user who posts a comment is captured along with the user's comment. 

Which code segment should you insert at line 04? 

A. ipaddr = Server["REMOTE_ADDR"].ToString(); 

B. ipaddr = Session["REMOTE_ADDR"].ToString(); 

C. ipaddr = Application["REMOTE_ADDR"].ToString(); 

D. ipaddr = Request.ServerVariables["REMOTE_ADDR"].ToString(); 

Answer: D


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

The application is tested by 50 client computers. A high volume of Trace messages is generated. 

You need to ensure that the following requirements are met: 

-The Trace information is sent only to the trace.axd file. 

-The trace.axd file contains the latest trace information from a maximum of 10 last requests. -The trace.axd file is available only on the host Web server. 

What should you add to the Trace element in the Web.config file? 

A. writeToDiagnosticTrace=":false" and pageOutput-"true " and localOnly="true" 

B. requestLimit="10" and pageOutput="true" and localOnly="true" 

C. mostRecent="true" and pageOutput="false" and localOnly="true" 

D. requestLimit="10" and pageOutput="false" and localOnly="true" 

Answer: D 


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

You add an XmlDataSource control named XmlDataSource1 to the Web page. XmlDataSource1 is bound to an XML document with the following structure. 

<?xml version="1.0" encoding="utf-8" ?> 

<clients> <client ID="1" Name="John Evans" /> <client ID="2" Name="Mike Miller"/> 

... 

</clients> 

You also write the following code segment in the code-behind file of the Web page. 

protected void BulletedList1_Click( 

?object sender, BulletedListEventArgs e) { 

//... } You need to add a BulletedList control named BulletedList1 to the Web page that is bound to XmlDataSource1. 

Which code fragment should you use? 

A. <asp:BulletedList ID="BulletedList1" runat="server" 

DisplayMode="LinkButton" DataSource="XmlDataSource1" 

DataTextField="Name" DataValueField="ID" 

onclick="BulletedList1_Click"> 

</asp:BulletedList> 

B. <asp:BulletedList ID="BulletedList1" runat="server" 

DisplayMode="HyperLink" DataSourceID="XmlDataSource1" 

DataTextField="Name" DataMember="ID" 

onclick="BulletedList1_Click"> 

</asp:BulletedList> 

C. <asp:BulletedList ID="BulletedList1" runat="server" 

DisplayMode="LinkButton" DataSourceID="XmlDataSource1" 

DataTextField="Name" DataValueField="ID" 

onclick="BulletedList1_Click"> 

</asp:BulletedList> 

D. <asp:BulletedList ID="BulletedList1" runat="server" 

DisplayMode="HyperLink" DataSourceID="XmlDataSource1" 

DataTextField="ID" DataValueField="Name" 

onclick="BulletedList1_Click"> 

</asp:BulletedList> 

Answer: C


70-562 exam question

Realistic 70-562 vce:

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

3.5. 

You deploy the application on a Microsoft IIS 6.0 Web server. The server runs on a worker process isolation mode, and it hosts the .NET Framework version 1.1 Web applications. 

When you attempt to browse the application, the following error message is received: 

"It is not possible to run different versions of ASP.NET in the same IIS process. Please use the IIS Administration Tool to reconfigure your server to run the application in a separate process." 

You need to ensure that the following requirements are met: 

-All the applications run on the server. 

-All the applications remain in process isolation mode. 

-All the applications do not change their configuration. 

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

A. Create a new application pool and add the new application to the pool. 

B. Configure the IIS 6.0 to run the WWW service in the IIS 5.0 isolation mode. 

C. Configure the new application to use the .NET Framework version 2.0 in the IIS 6.0 Manager. 

D. Set autoConfig="false" on the <processModel> property in the machine.config file. 

E. Disable the Recycle worker processes option in the Application Pool Properties dialog box. 

Answer: AC


Q44. DRAG DROP 

You are developing a Web application that exposes a list of news items from an ASP.NET Web service as JSON. 

You need to consume the Web service by using jQuery 1.4. 

How should you complete the client-side script? 

To answer, drag the appropriate parameter value or values to the correct location or locations in the answer area. 


Answer: 



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

3.5. 

You write the following code segment, 

namespace CommonControls { public class MyControl : WebControl { //... } } 

You include a MyControl custom server control named MyControll on the Web page by using the following code fragment. (Line numbers are included for reference only.) 

02 <form id=" MyForm " runat ="server"> 03 < custom:MyControl ID="MyControll" runat ="server" /> 04 </form> 

You need to add a directive that enables you to use custom control on the Web page. Which code fragment should you add at line 01? 

A. <%@ Import Namespace=" CommonControls “%> 

B. <%@ Assembly Name=" MyControl" Src =" MyControl" %> 

C. <%@ Register namespace=" CommonControls” tagprefix ="custom" %> 

D. <%@ Register namespace=" CommonControls “%> 

Answer: C


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

3.5. The application will use a Site Map. 

You write the following code fragment. 

<sitemap> <sitemapnode title="Home" description="Home" url="default.aspx" > 

<sitemapnode title="Catalog" description="Our catalog" 

url="catalog.aspx"/> 

<sitemapnode title="About Us" description="All about our 

company" url="aboutus.aspx"/> 

<sitemapnode title="Driving Directions" 

description="Directions to our store" url="aboutus.aspx"/> 

</sitemapnode> </sitemap> 

You need to implement an appropriate Site Map Provider. Which class should you use? 

A. The built-in XmlSiteMapProvider class 

B. A custom class derived from the SiteMapProvider base class 

C. A custom class derived from the StaticSiteMapProvider base class 

D. A custom SqlSiteMapProvider class derived from the SiteMapProvider base class 

Answer: C


Q47. HOTSPOT 

You develop a public Web application. The application will be deployed from your development computer to a server at a shared hosting provider. The server runs Windows Server 2008. 

You need to publish the application to the server. 

To which location should you publish the application? 

To answer, select the appropriate publishing option in the dialog box. 


Answer: 



Q48. You modify an existing Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. 

You add a theme to the ASP.NET application. 

You need to apply the theme to override any settings of individual controls. 

What should you do? 

A. In the Web.config file of the application, set the Theme attribute of the pages element to the name of the theme. 

B. In the Web.config file of the application, set the StyleSheetTheme attribute of the pages element to the name of the theme. 

C. Add a master page to the application. In the @Master directive, set the Theme attribute to the name of the theme. 

D. Add a master page to the application. In the @Master directive, set the StyleSheetTheme attribute to the name of the theme. 

Answer: A