Docstoc

70-562 PDF | Free 70-562 Exam Question | Download 70-562

Document Sample
70-562 PDF | Free 70-562 Exam Question | Download 70-562 Powered By Docstoc
					MCTS EXAM 70-562
TS: Microsoft .NET Framework 3.5, ASP.NET

Application Development

http://www.examsking.com/70-562.html


                                            Exams King

  Total Questions:                05        www.examsking.com
Question: 1

You are an application developer and you have about two years experience in developing Web-based applications by
using Microsoft ASP.NET. Now you are employed in a company named Wiikigo. You use the Microsoft .NET
Framework version 3.5 to create a Microsoft ASP.NET Web application which permits users to post comments to a page.
Other users can also view this page. You add a SqlDataSource control named SqlDS1. You write the following code
segment. (Linenumbers are included for reference only.)
1 private void SaveComment() 2 { 3 string ipaddr; 4 5 SqlDS1.InsertParameters["IPAddress"].DefaultValue = ipaddr; 6
... 7 SqlDS1.Insert(); 8 }
Now you receive an order from your company manager, according to his requirement, the IP Address of each user who
posts a comment must be captured along with the user's comment. At line 4, which code segment should be inserted?
A. ipaddr = Application["REMOTE_ADDR"].ToString();
B. ipaddr = Server["REMOTE_ADDR"].ToString();
C. ipaddr = Request.ServerVariables["REMOTE_ADDR"].ToString();
D. ipaddr = Session["REMOTE_ADDR"].ToString();

                                                                                                 Answer: C


Question: 2

You are an application developer and you have about two years experience in developing Web-based applications by
using Microsoft ASP.NET. Now you are employed in a company named Wiikigo. You use the Microsoft .NET
Framework version 3.5 to create a Microsoft ASP.NET Web application. Now you company CIO wants to deploy the
application to a test server. He assigns this task to you. The code-behind files for the Web pages must be compiled during
the initial request to the application. You must make sure of this. Besides this, you have to improve the performance of
the application. Of the following code fragments, which one should be added to the Web.config file?
A. <compilation debug="false" batch="false">
B. <compilation debug="true">
C. <compilation debug="true" batch="true">
D. <compilation debug="false">

                                                                                                 Answer: D


Question: 3

You are an application developer and you have about two years experience in developing Web-based applications by
using Microsoft ASP.NET. Now you are employed in a company named Wiikigo. You use the Microsoft .NET
Framework version 3.5 to create a Microsoft ASP.NET Web application. In the application, a single master page is used
by all the content pages. The master page browses the site by using a static navigation menu. Now you receive an order
from your company manager, according to his requirement, the content pages must be able to optionally replace the static
navigation menu with their own menu controls. You have been assigned to make sure of this. So what action should you
perform to achieve this goal?
A. Add the following code fragment to the master page. <asp:ContentPlaceHolder ID="MenuPlaceHolder"
runat="server"> <!-- Menu code here --></asp:ContentPlaceHolder> Add the following code fragment to the content
page. <asp:Content ContentPlaceHolderID="MenuPlaceHolder"> <asp:menu ID="menuControl"
runat="server"></asp:menu></asp:Content>
B. Add the following code fragment to the master page. <asp:PlaceHolder ID="MenuPlaceHolder" runat="server"> <div
id="menu"> <!-- Menu code here --> </div></asp:PlaceHolder> Add the following code segment to the Page_Load

For interactive and self-paced preparation of exam 70-562, try our practice exams.
Practice exams also include self assessment and reporting features.                                                          2
event of the content page. PlaceHolder placeHolder = Page.Master.FindControl("MenuPlaceHolder") as
PlaceHolder;Menu menuControl = new Menu();placeHolder.Controls.Add(menuControl);
C. Add the following code fragment to the master page. <asp:PlaceHolder ID="MenuPlaceHolder" runat="server"> <!--
Menu code here --></asp:PlaceHolder> Add the following code fragment to the content page. <asp:Content
PlaceHolderID="MenuPlaceHolder"> <asp:menu ID="menuControl" runat="server"></asp:menu></asp:Content> D.
Add the following code fragment to the master page. <asp:ContentPlaceHolder ID="MenuPlaceHolder" runat="server">
<!-- Menu code here --></asp:ContentPlaceHolder> Add the following code segment to the Page_Load event of the
content page. ContentPlaceHolder
placeHolder = Page.Master.FindControl("MenuPlaceHolder") as ContentPlaceHolder;Menu
menuControl = new Menu();placeHolder.Controls.Add(menuControl);

                                                                                            Answer: A


Question: 4

You are an application developer and you have about two years experience in developing Web-based applications by
using Microsoft ASP.NET. Now you are employed in a company named Wiikigo. You use the Microsoft .NET
Framework version 3.5 to create a Microsoft ASP.NET Web application which runs on Microsoft IIS 6.0. A page named
usedPage.aspx is created. Now your company assigns a task to you. According to his requirement, the browser must
display the URL of the usedPage.aspx page and the page named newPage.aspx. You have to achieve this goal. So in the
options below, which code segment should be used?
A. Response.Redirect("newPage.aspx");
B. Server.Transfer("newPage.aspx");
C. if (Request.Url.UserEscaped) { Response.RedirectLocation = "oldPage.aspx"; Response.Redirect("newPage.aspx",
true);}else { Response.Redirect("newPage.aspx");}
D. if (Request.Url.UserEscaped) { Server.TransferRequest("newPage.aspx");}else { Response.Redirect("newPage.aspx",
true);}

                                                                                            Answer: B




For interactive and self-paced preparation of exam 70-562, try our practice exams.
Practice exams also include self assessment and reporting features.                                                   3
Question: 5

You are an application developer and you have about two years experience in developing Web-based applications by
using Microsoft ASP.NET. Now you are employed in a company named Wiikigo. You use the Microsoft .NET
Framework version 3.5 to create a Microsoft ASP.NET Web application. There are two Web pages in the application.
The two Web pages are respectively named BillDetails.aspx and BillError.htm. A stack trace is displayed to remote users
if the application throws unhandled errors in the BillDetails.aspx Web page. You must make sure that the BillError.htm
Web page is displayed for unhandled errors only in the BillDetails.aspx Web page. So what action should you perform?
A. Set the Page attribute for the BillDetails.aspx Web page in the following manner. <%@ Page Language="C#"
AutoEventWireup="true" CodeFile="BillDetails.aspx.cs" Inherits="BillDetails" Debug="true" %> Add the following
section to the Web.config file. <customErrors mode="On" defaultRedirect="BillError.htm">
B. Set the Page attribute for the BillDetails.aspx Web page in the following manner. <%@ Page Language="C#"
AutoEventWireup="true" CodeFile="BillDetails.aspx.cs" Inherits="BillDetails" %> Add the following section to the
Web.config file. <customErrors mode="Off" defaultRedirect="BillError.htm"></customErrors>
C. Set the Page attribute for the BillDetails.aspx Web page in the following manner. <%@ Page Language="C#"
AutoEventWireup="true" CodeFile="BillDetails.aspx.cs" Inherits="BillDetails" Debug="true"
ErrorPage="~/BillError.htm" %> Add the following section to the Web.config file. <customErrors
mode="Off"></customErrors>
D. Set the Page attribute for the BillDetails.aspx Web page in the following manner. <%@ Page Language="C#"
AutoEventWireup="true" CodeFile="BillDetails.aspx.cs" Inherits="BillDetails" ErrorPage="~/BillError.htm"
Debug="false" %> Add the following section to the Web.config file. <customErrors mode="On"></customErrors>
                                                                                               Answer: D




For interactive and self-paced preparation of exam 70-562, try our practice exams.
Practice exams also include self assessment and reporting features.                                                       4
 Thank You For Trying Our Demo




                            MCTS EXAM 70-562
                          TS: Microsoft .NET Framework 3.5, ASP.NET

                                       Application Development

                              http://www.examsking.com/70-562.html



If you have any questions or difficulties regarding this
product, feel free to contact Us.
For interactive and self-paced preparation of exam 70-562, try our
practice exams. Practice exams also include self assessment and
reporting features!




For interactive and self-paced preparation of exam 70-562, try our practice exams.
Practice exams also include self assessment and reporting features.                  5

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:119
posted:2/11/2010
language:English
pages:5
Description: For more and updated 70-562 exam questions and answers visit Examsking.com. They provide many type of 70-562 exam preparation products to facilitate learning and success. All the products are provided with full technical support and money back guarantee.