PrepAway - Latest Free Exam Questions & Answers

Category: 70-567

Exam 70-567: UPGRADE: Transition your MCPD Web Developer Skills to MCPD ASP.NET Developer 3.5

Which code segment should you insert at line 06?

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

You create a login Web form by using the following code fragment.

<asp:ScriptManager ID=”ScriptManager1″ runat=”server” />
<asp:TextBox runat=”server” ID=”txtUser” Width=”200px” />
<asp:TextBox runat=”server” ID=”txtPassword” Width=”200px” />
<asp:Button runat=”server” ID=”btnLogin” Text=”Login” OnClientClick=”login(); return false;” />

When a user clicks the btnLogin Button control, the login() client-side script is called
to authenticate the user. The credentials provided in the TextBox controls are used to
call the client-side script.

You also add the following client-script code fragment in the Web form. (Line numbers
are included for reference only.)

01 <script type=”text/javascript”>
02 function login() {
03 var username = $get(‘txtUser’).value;
04 var password = $get(‘txtPassword’).value;
05
06 // authentication logic.
07 }
08 function onLoginCompleted(validCredentials, userContext,
09 methodName)
10 {
11 // notify user on authentication result.
12 }
13
14 function onLoginFailed(error, userContext, methodName)
15 {
16 // notify user on authentication exception.
17 }
18 </script>

The ASP.NET application is configured to use Forms Authentication. The ASP.NET AJAX authentication service is activated in the Web.config file.

You need to ensure that the following workflow is maintained:

– On successful authentication, the onLoginCompleted client-script function is called to notify the user.
– On failure of authentication, the onLoginFailed client-script function is called to display an error message.

Which code segment should you insert at line 06?

What are three possible reasons that could cause this increase?

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

When you review the application performance counters, you discover that there is an unexpected increase in the value of the Application Restarts counter.
You need to identify the reasons for this increase.
What are three possible reasons that could cause this increase? (Each correct answer presents a complete solution. Choose three.)

Which method should you use?

You are creating an ASP.NET application by using the .NET Framework 3.5.
You create an AJAX Web form in the application.
You create an ASP.NET AJAX client-component class in the Web form.
The class will be used in a JavaScript function in the Web form.
You plan to debug the JavaScript function.
You need to display all the fields of the AJAX client-component object in the trace console in the Web form by using the minimum amount of code.

Which method should you use?

Which code fragment should you use?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The application consumes an ASMX Web service.

The Web service is hosted at the following URL.
http://www.contoso.com/TemperatureService/Convert.asmx

You need to ensure that the client computers can communicate with the service as part of the <system.serviceModel> configuration.
Which code fragment should you use?

Which code segment should you insert at line 06?

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

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

01 string strQuery = “select * from Products;”
02 + “select * from Categories”;
03 SqlCommand cmd = new SqlCommand(strQuery, cnn);
04 cnn.Open();
05 SqlDataReader rdr = cmd.ExecuteReader();
06
07 rdr.Close();
08 cnn.Close();

You need to ensure that the gvProducts and gvCategories GridView controls display the data that is contained in the following two database tables:

The Products database table
The Categories database table

Which code segment should you insert at line 06?

Which code segment should you insert at line 06?

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

You create a login Web form by using the following code fragment.

<asp:ScriptManager ID=”ScriptManager1″ runat=”server” />
<asp:TextBox runat=”server” ID=”txtUser” Width=”200px” />
<asp:TextBox runat=”server” ID=”txtPassword” Width=”200px” />
<asp:Button runat=”server” ID=”btnLogin” Text=”Login” OnClientClick=”login(); return false;” />

When a user clicks the btnLogin Button control, the login() client-side script is called
to authenticate the user. The credentials provided in the TextBox controls are used to
call the client-side script.

You also add the following client-script code fragment in the Web form. (Line numbers
are included for reference only.)

01 <script type=”text/javascript”>
02 function login() {
03 var username = $get(‘txtUser’).value;
04 var password = $get(‘txtPassword’).value;
05
06 // authentication logic.
07 }
08 function onLoginCompleted(validCredentials, userContext,
09 methodName)
10 {
11 // notify user on authentication result.
12 }
13
14 function onLoginFailed(error, userContext, methodName)
15 {
16 // notify user on authentication exception.
17 }
18 </script>

The ASP.NET application is configured to use Forms Authentication. The ASP.NET AJAX authentication service is activated in the Web.config file.

You need to ensure that the following workflow is maintained:

– On successful authentication, the onLoginCompleted client-script function is called to notify the user.
– On failure of authentication, the onLoginFailed client-script function is called to display an error message.

Which code segment should you insert at line 06?

Which DeviceSpecific element should you insert at line 02?

You create a Microsoft ASP.NET Web application by using the Microsoft .NET Framework version 3.5.
he application contains the following device filter element in the Web.config file.

<filter name=”isHtml” compare=”PreferredRenderingType” argument=”html32″ />

The application contains a Web page that has the following image control. (Line numbers are included for reference only.)

01 <mobile:Image ID=”imgCtrl” Runat=”server”>
02
03 </mobile:Image>

You need to ensure that the following conditions are met:

– The imgCtrl Image control displays the highRes.jpg file if the Web browser supports html.
– The imgCtrl Image control displays lowRes.gif if the Web browser does not support html.

Which DeviceSpecific element should you insert at line 02?

Which code fragment should you use?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The application consumes an ASMX Web service.

The Web service is hosted at the following URL.
http://www.contoso.com/TemperatureService/Convert.asmx

You need to ensure that the client computers can communicate with the service as part of the <system.serviceModel> configuration.
Which code fragment should you use?

Which code segment you should insert at line 12?

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 {
12
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?


Page 1 of 1112345...10...Last »