PrepAway - Latest Free Exam Questions & Answers

Category: 70-568

Exam 70-568: UPGRADE: Transition your MCPD Enterprise Application Developer Skills to MCPD Enterprise Application Developer 3.5, Part 1

Which DeviceSpecific element should you insert at line 02?

You create a Microsoft ASP.NETWeb application by using the Microsoft .NET Framework
version 3.5.The 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 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 should you do?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework
version 3.5.You create a Web form by using ASP.NET AJAX.You write the following
client-script code fragment to handle the exceptions thrown from asynchronous postbacks.
(Line numbers are included for reference only.)
01 <script type=”text/javascript”>
02 function pageLoad()
03 {
04 var pageMgr =
05 Sys.WebForms.PageRequestManager.getInstance();
06
07 }
08
09 function errorHandler(sender, args)
10 {
11
12 }
13 </script>
You need to ensure that the application performs the following tasks:
Use a common client-script function named errorHandler.

Update a Label control that has an ID named lblError with the error message.
Prevent the browser from displaying any message box or Javascript error.
What should you do?

What should you do?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework
version 3.5.You write the following code segment to create a client-script function. (Line
numbers are included for reference only.)
01 function updateLabelControl(labelId, newText) {
02 var label = $find(labelId);
03 label.innerHTML = newText;
04 }
The client script function uses ASP.NET AJAX and updates the text of any Label control in
the Web form.When you test the client script function, you discover that the Label controls
are not updated. You receive the following JavaScript error message in the browser: “‘null’ is
null or not an object.” You need to resolve the error.What should you do?

What should you do?

You create a Microsoft ASP.NETWeb application by using the Microsoft .NET Framework
version 3.5.You add the following code fragment to an AJAX-enabled Web form. (Line
numbers are included for reference only.)
01 <asp:ScriptManager ID=”scrMgr” runat=”server” />
02 <asp:UpdatePanel ID=”updPanel” runat=”server”
03 UpdateMode=”Conditional”>
04 <ContentTemplate>
05 <asp:Label ID=”lblTime” runat=”server” />
06 <asp:UpdatePanel ID=”updInnerPanel”
07 runat=”server” UpdateMode=”Conditional”>
08 <ContentTemplate>
09 <asp:Timer ID=”tmrTimer” runat=”server”
10 Interval=”1000″
11 OnTick=”tmrTimer_Tick” />
12 </ContentTemplate>
13
14 </asp:UpdatePanel>
15 </ContentTemplate>
16
17 </asp:UpdatePanel>
The tmrTimer_Tick event handler sets the Text property of the lblTime Label control to the
current time of the server.You need to configure the appropriate UpdatePanel control to
ensure that the lblTime Label Control is properly updated by the tmrTimer Timer control.
What should you do?

What should you do to ensure that the requirements shown in the following table are met?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework
version 3.5.You write the following code fragment. (Line numbers are included for reference
only.)
01 <asp:UpdatePanel ID=”upnData” runat=”server”
02 ChildrenAsTriggers=”false” UpdateMode=”Conditional”>
03 <Triggers>
04
05 </Triggers>
06 <ContentTemplate>
07 <!– more content here –>
08 <asp:LinkButton ID=”lbkLoad” runat=”server” Text=”Load”
09 onclick=”lbkLoad_Click” />
10 <asp:Button ID=”btnSubmit” runat=”server” Text=”Submit”
11 Width=”150px” onclick=”btnSubmit_Click” />
12 </ContentTemplate>
13 </asp:UpdatePanel>
14 <asp:Button ID=”btnUpdate” runat=”server” Text=”Update”
15 Width=”150px” onclick=”btnUpdate_Click” />
You need to ensure that the requirements shown in the following table are met. What should you do?

Which code fragment should you insert at line 11?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework
version 3.5.You add the following code fragment to the Web.config file of the application
(Line numbers are included for reference only).
01 <healthMonitoring>
02 <providers>
03 <add name=”EventLogProvider”
04 type=”System.Web.Management.EventLogWebEventProvider
05 />
06 <add name=”WmiWebEventProvider”
07 type=”System.Web.Management.WmiWebEventProvider
08 />
09 </providers>
10 <eventMappings>
11
12 </eventMappings>
13 <rules>
14 <add name=”Security Rule” eventName=”Security Event”
15 provider=”WmiWebEventProvider” />
16 <add name=”AppError Rule” eventName=”AppError Event”
17 provider=”EventLogProvider” />
18 </rules>
19 </healthMonitoring>
You need to configure Web Events to meet the following requirements:
Security-related Web Events are mapped to Microsoft Windows Management
Instrumentation (WMI) events.
Web Events caused by problems with configuration or application code are logged
into the Windows Application Event Log.
Which code fragment should you insert at line 11?

Which two actions should you perform?

You create a Microsoft ASP.NET AJAX application by using the Microsoft .NET
Framework version 3.5.A JavaScript code segment in the AJAX application does not exhibit
the desired behavior. Microsoft Internet Explorer displays an error icon in the status bar but
does not prompt you to debug the script.You need to configure the Internet Explorer to
prompt you to debug the script. Which two actions should you perform? (Each correct
answer presents part of the solution. Choose two.)

What should you do?

You create a Microsoft ASP.NET AJAX application by using the Microsoft .NET
Framework version 3.5.You use AJAX-enabled components in the Web page. You add a
ScriptManager control to the page. The Web.config file has the following code fragment.
<deployment retail=”false” />
You receive an unhandled exception in the browser. You plan to debug the client-side script.
You need to ensure that the debug scripts are sent to the browser. What should you do?


Page 4 of 12« First...23456...10...Last »