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

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 v3.5. Your application contains a Web page named Index.aspx that includes various controls. You create a custom control named ckCache that you add to the Index.aspx pag

  • You have to make sure that the ckCache control does not affect the cache settings of other controls on the Index.aspx page and that it remains static for sixty seconds. What should you?
    1. This can be accomplished by adding the ProfileCache class that inherits from the ConfigurationSection class to the Index.aspx.cs pag
    2. Thereafter the code below should be added to the Web.config file of the solution.
      <ProfileCache profile=”CachedProfileSet” varyByParam=”ckCache” duration=”60″>
      </ProfileCache>
      <caching>
      <outputCache enableOutputCache=”true”/>
      </caching>
    3. This can be accomplished by adding the code below to the Web.config file of the solution.
      <caching>
      <outputCacheSettings>
      <outputCacheProfiles>
      <add name=”CachedProfileSet” varyByControl=”ckCache” duration=”60″ />
      </outputCacheProfiles>
      </caching>
    4. This can be accomplished by adding code below to the Web.config file of the solution.
      <caching>
      <outputCacheSettings>
      <outputCacheProfiles>
      <add name=”CachedProfileSet” varyByParam=”ckCache” duration=”60″ />
      </outputCacheProfiles>
      </outputCacheSettings>
      </caching>
    5. This can be accomplished by adding the CKProfileCache class that inherits from the ConfigurationSection class to the – 169 -Index.aspx.cs pag
    6. Thereafter the code below should be added to the Web.config file of the solution.
      <CKProfileCache profile=”CachedProfileSet” varyByControl=”ckCache” duration=”60″>
      </CKProfileCache>
      <caching>
      <outputCache enableOutputCache=”true”/>
      </caching>

    Correct Answer: 2


    Question: You work as a Web Developer at Company.com. Company.com uses Microsoft ASP.NET 3.5 to create Web applications. You are developing an application that is hosted on a Web Farm. The application makes use of in-process session state but a client might not remain connected to the same Web server across multiple requests. The following code is contained in an ASP.NET page (the line numbers are included for reference purposes only):
    01 protected void Page_Load(object sender, EventArgs e)
    02 {
    03 String conStr = WebConfigurationManager.ConnectionStrings[0].ConnectionString;
    04 using (SqlConnection con = new SqlConnection(conStr))
    05 {
    06 SqlCommand cmd = new SqlCommand(“GetCKExams”, con);
    07 SqlDataAdapter adapter = new SqlDataAdapter(cmd);
    08 DataSet ds = new DataSet();
    09 adapter.Fill(ds);
    11 if (Request.QueryString[“Action”] == Boolean.TrueString)
    12 {
    13 //
    14 }
    15 }
    16 }
    The code retrieves exam information from a Microsoft SQL Server database that is used fills a DataSet instanc

  • Only when a query string parameter named Action has the value ‘TRUE’, an ASP.NET page named CKExams.aspx must access the exam information in the DataSet instanc
  • It is required of you to add the proper code in line 13 in order to accomplish your objectiv
  • What should you do?
    1. You should consider using the code:
      Session[“ExamInfo”] = ds;
      HttpWebRequest.Create(“CKExams.aspx”).GetResponse();
    2. You should consider using the code:
      Context.Items.Add(“ExamInfo”, ds);
      Response.Redirect(“CKExams.aspx”);
    3. You should consider using the code:
      Session[“ExamInfo”] = ds;
      Response.RedirectLocation = “CKExams.aspx”;
    4. You should consider using the code:
      Context.Items.Add(“ExamInfo”, ds);
      Server.Transfer(“CKExams.aspx”);

    Correct Answer: 4


    Question: You work as a Web Developer at Company.com. You use Microsoft ASP.NET 3.5 to create a Web application. A Hypertext Transfer Protocol (HTTP) handler is implemented to produce Human Interactive Proof (HIP) images. You have to make sure that the current page invoke the handler and automatically continue executing after the handler completes execution. What should you do?

    1. You should consider setting the RedirectLocation property of the HttpResponse class.
    2. You should consider calling the Redirect method of the HttpResponse class.
    3. You should consider calling the Execute method of the HttpServerUtility class.
    4. You should consider calling the Transfer method of the HttpServerUtility class.

    Correct Answer: 3


    Question: You work as a Web Application Developer at Company.com. You are in the process of creating an ASP NET application that uses Microsoft .NET Framework 3.5. You create a Web page that contains the control below:

    The code-behind file for the Web page contains the code below:

    Management wants you to make sure that the cal1 Calendar control is able to retain the selected dat

  • You should therefore identify the appropriate code that should be adde
  • What should you identify?
    1. You should consider adding:
      this.Load += new EventHandler(LoadDate);
      this.Unload += new EventHandler(sDate);
    2. You should consider adding:
      this.Load += new EventHandler(LoadDate);
      this.PreRender += new EventHandler(sDate);
    3. You should consider adding:
      this.Init += new EventHandler(LoadDate);
      this.Unload += new EventHandler(sDate);
    4. You should consider adding:
      this.Init += new EventHandler(LoadDate);
      this.PreRender += new EventHandler(sDate);

    Correct Answer: 2


    Question: You work as an application developer at Company.com. You make use of .NET Framework 3.5 to create an ASP.NET application. You application contains the following code:


    You receive an instruction to make sure that every Label control value is asynchronously updatable as soon as the btnSubmit Button control is selecte
  • You should thus determine the appropriate code that will accomplish this. What should you do?
    1. You should consider using:
      Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs)
      Lbl1.Text = “Value 1 updated”
      Lbl2.Text = “Value 2 updated”
      ScMan1.RegisterDataItem(Lbl3, “Value 3 updated”)
      End Sub
    2. You should consider using:
      Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs)
      Lbl1.Text = “Value 1 updated”
      Lbl2.Text = “Value 2 updated”
      ScMan1.RegisterAsyncPostBackControl(Lbl3)
      Lbl3.Text = “Value 3 updated”
      End Sub
    3. You should consider using:
      Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs)
      Lbl1.Text = “Value 1 updated”
      Lbl2.Text = “Value 2 updated”
      Lbl3.Text = “Value 3 updated”
      End Sub
    4. You should consider using:
      Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs)
      ScMan1.RegisterDataItem(Lbl1, “Value 1 updated”)
      ScMan1.RegisterDataItem(Lbl2, “Value 2 updated”)
      Lbl3.Text = “Value 3 updated”
      End Sub

    Correct Answer: 1

  • 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.