Exam 70-562 : Microsoft .NET Framework 3.5, ASP.NET Application Development – 31

Question: You work as a Web Developer at Company.com. Company.com is currently using Microsoft ASP.NET 3.5. You then decide to create a Web application with a page that contains a DropDownList control named _cultureDDL. A record of languages to which the user interface is localized is displayed by the DropDownList control. The page makes use of local resources in the App_LocalResources folder. You want to write code in order to localize the page based on the selected languag

  • You need to make sure that the solution retains the localized version of the page across postback requests. What should you do?
    1. You should use the code segment:
      protected override void OnInit(EventArgs e)
      {
      string cInfo = _cultureDDL.SelectedValue;
      Thread.CurrentThread.CurrentUICulture = new CultureInfo(cInfo);
      }
    2. You should use the code segment:
      protected override void OnPreRender(EventArgs e)
      {
      string cInfo = _cultureDDL.SelectedValue;
      Thread.CurrentThread.CurrentCulture = new CultureInfo(cInfo);
      }
    3. You should use the code segment:
      protected override void OnPreInit(EventArgs e)
      {
      string cInfo = _cultureDDL.SelectedValue;
      Thread.CurrentThread.CurrentCulture = new CultureInfo(cInfo);
      }
    4. You should use the code segment:
      protected override void InitializeCulture()
      {
      string cInfo = Request.Form[“_cultureDDL”];
      if (cInfo!= null)
      {
      Thread.CurrentThread.CurrentUICulture = new CultureInfo(cInfo);
      }
      }

    Correct Answer: 4


    Question: You work as an application developer at Company.com. You make use of .NET Framework 3.5 to create an ASP.NET application. The application contains a Web Page in its root. This Web Page is named Data.aspx. The Web page contains a folder named TestResources. You then add a KingResources.resx resource file in App_GlobalResources. This file contains a localized resource named TestImag

  • You receive an instruction from management to retrieve the value of TestImag
  • You thus need to determine the appropriate code segment that will accomplish this. What should you do?
    1. This can be accomplished by using the code segment:
      string testImage = (string)GetTestResource(“KingResources”, “TestImage”)
    2. This can be accomplished by using the code segment:
      string testImage = (string)GetTestResource(“Data”, “TestImage”)
    3. This can be accomplished by using the code segment:
      string testImage = (string)GetLocalResource(“TestImage”)
    4. This can be accomplished by using the code segment:
      string testImage = (string)GetLocalResource(“KingResources.TestImage”)

    Correct Answer: 3


    Question: You work as an application developer at Company.com. Your job function encompasses creating an ASP.NET application for the network. You make use of Microsoft .NET Framework 3.5 to create the application. The application is hosted on a Web server named Company-SR27. You receive a request from management to monitor the performance data of the newly created application. For security purposes you need to make sure that he data is only available when a Company.com user is logged on to Company-SR02. What should you do?

    1. You should consider adding <trace enabled=”true” writeToDiagnosticsTrace=”true” pageOutput=”true” localOnly=”true” /> to the Web.config fil
    2. You should consider adding <compilation debug=”false” urlLinePragmas=”true” /> to the Web.config fil
    3. You should consider adding <trace enabled=”true” pageOutput=”false” localOnly=”true” /> to the Web.config fil
    4. You should consider adding <compilation debug=”true” /> to the Web.config fil

    Correct Answer: 3


    Question: You work as a junior developer at Company.com. You make use of Microsoft .NET Framework 3.5 to manage an ASP.NET application. The application contains a Web page named Index.aspx. You need to make sure that the application redirects to a Web page named Default2.aspx when the user browses to Index.aspx. Management wants you to make sure that the web users do not see the original URL after the redirection. The whole process should only use one request from the Web browser. What should you do?

    1. This can be achieved by using the HttpContext.Current.RewritePath method in order to transfer to the Default2.aspx pag
    2. This can be achieved by adding the new URL value to the Response.Headers collection. Then the Response.End() statement should be calle
    3. Thereafter the header should be sent to the client computer in order to transfer to the Default2.aspx pag
    4. This can be achieved by using the Server.Transfer method in order to transfer to the Default2.aspx pag
    5. This can be achieved by using the Response.Redirect method in order to transfer to the Default2.aspx pag

    Correct Answer: 1


    Question: You work as an application developer at Company.com. You are in the process of creating an ASP.NET application that uses Microsoft .NET Framework 3.5. This application is configured to run Microsoft IIS 6.0. You receive an instruction to create a page on the application. You name this page prev.aspx. To ensure that productivity is maintained you need to make sure that the browser displays the URL of the prev.aspx page as well as the page named home.aspx as soon as Company.com users try to access the pag

  • What should you do?
    1. You should consider using the code below:
      if (Request.Url.UserEscaped) {
      Server.TransferRequest(“home.aspx”);
      } else {
      Response.Redirect(“home.aspx”, true);
      }
    2. You should consider using the code below:
      Response.Redirect(“home.aspx”);
    3. You should consider using the code below:
      Server.Transfer(“home.aspx”);
    4. You should consider using the code below:
      if (Request.Url.UserEscaped) {
      Response.RedirectLocation = “prev.aspx”;
      Response.Redirect(“home.aspx”, true);
      } else {
      Response.Redirect(“home.aspx”);
      }

    Correct Answer: 3

  • Tagged . Bookmark the permalink.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.