Exam 70-562 study material Made available by Testkingprep.com
Free 70-562 Exam Preparation Questions Exam 70-562: TS: Microsoft .NET Framework 3.5, ASP.NET Application Development
For Latest 70-562 Exam Questions and study guides- visit- http://www.testkingprep.com/70-562.html
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 application. Look at the following code fragment. (Line numbers are included for reference only.) 1 <script runat="server">2 protected void Button_Handler(object sender, EventArgs e)3 { 4 // some longprocessing operation. 5 } 6 </script> 7 <div> 8 <asp:ScriptManager ID="defaultScriptManager" 9 runat="server" /> 11 <asp:UpdatePanel ID="defaultPanel" 12 UpdateMode="Conditional" runat="server"> 13 <ContentTemplate>14 <!-- more content here --> 15 <asp:Button ID="btnSubmit" runat="server" 16 Text="Submit" OnClick="Button_Handler" /> 17 </ContentTemplate> 18 </asp:UpdatePanel> 19 </div> In the application, you use the above code fragment to create a Web form. Now your company manager asks you to use ASP.NET AJAX to create a client-side script code. According to the requirement of the company manager, any subsequent Click events on the btnSubmit Button control must be suppressed when a request is being processed. The manager asks you to make sure of this. At line 10, which code fragment should be inserted? A. <script type="text/javascript" language="javascript"> var rm = Sys.WebForms.PageRequestManager.getInstance(); rm.add_beginRequest(checkPostback); function checkPostback(sender, args) { var request = args.get_request(); if (rm.get_isInAsyncPostBack() & args.get_postBackElement().id == 'btnSubmit') { request.completed(new Sys.CancelEventArgs()); alert('A previous request is still in progress.'); } } </script> B. <script type="text/javascript" language="javascript"> var rm = Sys.WebForms.PageRequestManager.getInstance(); rm.add_beginRequest(checkPostback); function checkPostback(sender, args) { if (rm.get_isInAsyncPostBack() & args.get_postBackElement().id == 'btnSubmit') { rm.abortPostBack(); alert('A previous request is still in progress.'); } }</script> C. <script type="text/javascript" language="javascript"> var rm = Sys.WebForms.PageRequestManager.getInstance(); rm.add_initializeRequest(checkPostback); function checkPostback(sender, args) { if (rm.get_isInAsyncPostBack() & args.get_postBackElement().id == 'btnSubmit') { rm.abortPostBack(); alert('A previous request is still in progress.'); } }</script> D. <script type="text/javascript" language="javascript"> var rm = Sys.WebForms.PageRequestManager.getInstance(); rm.add_initializeRequest(checkPostback); function checkPostback(sender, args) { if (rm.get_isInAsyncPostBack() & args.get_postBackElement().id == 'btnSubmit') { args.set_cancel(true); alert('A previous request is still in progress.'); } }</script> Answer: D 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 which consumes an ASMX Web service. Look at the URL below:
For Latest 70-562 Exam Questions and study guides- visit- http://www.testkingprep.com/70-562.html
http://www.contoso.com/TemperatureService/Convert.asmx This URL hosts the Web service Now you receive an order from your company manager, according to his requirement, the client computers must be able to communicate with the service as part of the <system.serviceModel> configuration. You have been assigned this task. Of the following code fragment, which one should be used? A. <client> <endpoint address="http: //www.contoso.com/TemperatureService/Convert.asmx"binding="wsDualHttpBinding" /></client> B. <client> <endpointaddress="http: //www.contoso.com/TemperatureService/Convert.asmx"binding="wsHttpBinding" /></client> C. <client> <endpoint address="http: //www.contoso.com/TemperatureService/Convert.asmx"binding="basicHttpBinding" /></client> D. <client> <endpoint address="http: //www.contoso.com/TemperatureService/Convert.asmx"binding="ws2007HttpBinding" /></client> Answer: C 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. You write the following code segment to create a class named MultimediaDownloader. The class implements the IHttpHandler interface. namespace Contoso.Web.UI { public class MultimediaDownloader : IHttpHandler { ... } } The MultimediaDownloader class returns the content of the multimedia files from the Web server and processes requests for the files that have the .media file extension. The .media file extension is mapped to the aspnet_isapi.dll file in Microsoft IIS 6.0. According to the requirement of the company CIO, you have to configure the MultimediaDownloader class in the Web.config file of the application. Which code fragment should be used? A. <httpHandlers> <add verb="*" path="*.media" validate="false" type="Contoso.Web.UI.MultimediaDownloader" /></httpHandlers> B. <httpHandlers> <add verb="GET,POST" path="*" validate="true" type="Contoso.Web.UI.MultimediaDownloader" /></httpHandlers> C. <httpHandlers> <add verb="*.media" path="*" validate="false" type="Contoso.Web.UI.MultimediaDownloader" /></httpHandlers> D. <httpHandlers> <add verb="HEAD" path="*.media" validate="true" type="Contoso.Web.UI.MultimediaDownloader" /></httpHandlers> 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. In order to create a Web form, you write the following code segment in the code-behind file. (Line numbers are used for reference only.) 1 string strQuery = "select * from Products;" 2 + "select * from Categories"; 3 SqlCommand cmd = new SqlCommand(strQuery, cnn); 4 cnn.Open();5 SqlDataReader rdr = cmd.ExecuteReader();
For Latest 70-562 Exam Questions and study guides- visit- http://www.testkingprep.com/70-562.html
7 rdr.Close();8 cnn.Close(); There are two database tables. One is the Products database table, another one is the Categories database table. Now you receive an order from your company manager, according to his requirement, the gvProducts and gvCategories GridView controls must display the data that is contained in the tables. You have been assigned this task. At line 6, which code segment should be inserted? A. gvProducts.DataSource = rdr;gvCategories.DataSource = rdr;gvProducts.DataBind();rdr.NextResult();gvCategories.DataBind(); B. gvProducts.DataSource = rdr;gvProducts.DataBind();gvCategories.DataSource = rdr;gvCategories.DataBind(); C. gvProducts.DataSource = rdr;gvCategories.DataSource = rdr;gvProducts.DataBind();gvCategories.DataBind(); D. gvProducts.DataSource = rdr;rdr.NextResult();gvCategories.DataSource = rdr;gvProducts.DataBind();gvCategories.DataBind(); Answer: A 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. A page is created. The page contains the control below: <asp:Calendar EnableViewState="false" ID="calBegin" runat="server" /> You write the code segment below in the code-behind file for the page. void LoadDate(object sender, EventArgs e) { if (IsPostBack) { calBegin.SelectedDate = (DateTime)ViewState["date"]; }} void SaveDate(object sender, EventArgs e) { ViewState["date"] = calBegin.SelectedDate;} According to the requirement of the company CIO, the calBegin Calendar control must maintain the selected date. You are assigned to make sure of this. Which code segment should be inserted in the constructor of the page? A. this.Init += new EventHandler(LoadDate);this.PreRender += new EventHandler(SaveDate); B. this.Load += new EventHandler(LoadDate);this.PreRender += new EventHandler(SaveDate); C. this.Load += new EventHandler(LoadDate);this.Unload += new EventHandler(SaveDate); D. this.Init += new EventHandler(LoadDate);this.Unload += new EventHandler(SaveDate); Answer: B Question:6 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 AJAX application. In order to debug the JavaScript code in the AJAX application, Microsoft Visual Studio 2008 debugger is attached to the Microsoft Internet Explorer instance. Now you receive an order from your company manager, according to his requirement, the application must display the details of the client-side object on the debugger console. The manager asks you to make sure of this. So what action should you perform?
For Latest 70-562 Exam Questions and study guides- visit- http://www.testkingprep.com/70-562.html
A. In order to make sure of this, the Sys.Debug.assert method should be used. B. In order to make sure of this, the Sys.Debug.traceDump method should be used. C. In order to make sure of this, the Sys.Debug.fail method should be used. D. In order to make sure of this, the Sys.Debug.trace method should be used. Answer: B Question:7 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 on a Microsoft IIS 6.0 Web server. The server hosts the .NET Framework version 1.1 Web applications and runs on a worker process isolation mode. An error message pops up when you browse the application. The error message is "It is impossible to run different versions of ASP.NET in the same IIS process. Please reconfigure your server to run the application in a separate process by using the IIS Adinistratration Tool." You must make sure that all the applications run on the server and remain in process isolation mode, and do not change their configurations. What action should you perform? (choose more thano one) A. You should configure the IIS 6.0, making it run the WWW service in the IIS 5.0 isolation mode. B. You should add the new application to the application pool that you create. C. In the Application Pool Properties dialog box, you should disable the Recycle worker processes option. D. You should configure the new application, making it use the .NET Framework version 2.0 in the IIS 6.0 Manager. E. You should set autoConfig="false" on the <processModel> property in the machine.config file. Answer: B, D Question:8 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 is a server named WiikigoTest which runs Microsoft IIS 5.0. The WiikigoTest server hosts the application. There is a computer named WiikigoComp. You log on to the Wiikigo.com domain by using this computer with an account named WiikigoUser. Both the WiikigoComp and WiikigoTest are members of the Wiikigo.com domain. Now you receive an order from your company manager, according to his requirement, remote debugging should be allowed. So you have to set up the appropriate permission for remote debugging. What action should you do? A. The ContosoUser account should be added to the domain Administrators group. B. You should set the Remote Debugging Monitor, making it use Windows Authentication. C. On the ContosoTest server, you should change the ASP.NET worker process, making it run as the local Administrator account. D. The ContosoUser account should be added to the local Administrators group on the ContosoTest server. Answer: D Question:9 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
For Latest 70-562 Exam Questions and study guides- visit- http://www.testkingprep.com/70-562.html
use the Microsoft .NET Framework version 3.5 to create a Microsoft ASP.NET Web application. You create a Web form is created. The Web form 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.) 1 protected void Page_Load(object sender, EventArgs e) 2 { 3 DataSet objDS = new DataSet(); 4 SqlDataAdapter objDA = new SqlDataAdapter(objCmd); 5 objDA.Fill(objDS); 6 gridCities.DataSource = objDs; 7 gridCities.DataBind(); 8 Session["ds"] = objDS; 9 } 10 protected void btnSearch_Click(object sender, EventArgs e)11 { 12 13 } Now you get an e-mail from your company CIO, according to his requirement, by using the value of the txtSearch TextBox, the records in the gridCities GridView control are filtered when the btnSearch Button control is clicked. You're assigned this task to make sure of this. At line 12, which code segment you be inserted? 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 Question:10 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
For Latest 70-562 Exam Questions and study guides- visit- http://www.testkingprep.com/70-562.html
For Latest 70-562 Exam Questions and study guides- visit- http://www.testkingprep.com/70-562.html
For complete Exam 70-562 Training kits and Self-Paced Study Material Visit: http://www.testkingprep.com/70-562.html
http://www.testkingprep.com/
For Latest 70-562 Exam Questions and study guides- visit- http://www.testkingprep.com/70-562.html