What should you do?
You are troubleshooting an ASP.NET Web application.
System administrators have recently expanded your web farm from one to two servers.
Users are periodically reporting an error message about invalid view state.
You need to fix the problem.
What should you do?
What are two possible ways to achieve this goal?
You create an ASP.NET page that contains the following tag.
<h1 id=”hdr1″ runat=”server”>Page Name</h1>
You need to write code that will change the contents of the tag dynamically when the page is loaded. What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
Which ObjectContext method should you call?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You use the ADO.NET Entity Framework to model your entities. You use Plain Old CLR Objects (POCO) entities along with snapshotbased change tracking. The code accesses the POCO entities directly. You need to ensure that the state manager synchronizes when changes are made to the object graph. Which ObjectContext method should you call?
Which code segment should you use?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application that uses the Entity Framework.
The application has an entity model that contains a SalesOrderHeader entity. The entity includes an OrderDate property of type DateTime.
You need to retrieve the 10 oldest SalesOrderHeaders according to the OrderDate property.
Which code segment should you use?
What should you do?
You have created an ASP.NET server control named ShoppingCart for use by other developers.
Some developers report that the ShoppingCart control does not function properly with ViewState disabled.
You want to ensure that all instances of the ShoppingCart control work even if ViewState is disabled.
What should you do?
Which code segment should you use?
You create a Web page that contains drop-down menus that are defined by using div tags in the following code.
<div class=”dropdown-menu”>
<div class=”menu-title”>Menu One</div>
<div class=”menu-items” style=”display:none;”>
<div><a href=”#”>Item One</a></div>
<div><a href=”#”>Item Two</a></div>
</div>
</div>
<div class=”dropdown-menu”>
<div class=”menu-title”>Menu Two</div>
<div class=”menu-items” style=”display:none;”>
<div><a href=”#”>Item Three</a></div>
<div><a href=”#”>Item Four</a></div>
</div>
</div>
You need to write a JavaScript function that will enable the drop-down menus to activate when the user positions the mouse over the menu title.
Which code segment should you use?
Which code fragment should you insert at line 12?
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You want the application to contain a window as shown in the following exhibit. The application contains the following code fragment. (Line numbers are included for reference only.)
01 <Grid ShowGridLines=”True”>
02 <Grid.ColumnDefinitions>
03 <ColumnDefinition />
04 <ColumnDefinition />
05 <ColumnDefinition />
06 </Grid.ColumnDefinitions>
07 <Grid.RowDefinitions>
08 <RowDefinition />
09 <RowDefinition />
10 <RowDefinition />
11 </Grid.RowDefinitions>
12
13 <TextBlock FontWeight=”Bold” Grid.Row=”1″ Grid.Column=”0″>Quarter</TextBlock>
14 <TextBlock FontWeight=”Bold” Grid.Row=”1″ Grid.Column=”1″>Quarter 1</TextBlock>
15 <TextBlock FontWeight=”Bold” Grid.Row=”1″ Grid.Column=”2″>Quarter 2</TextBlock>
16 <TextBlock FontWeight=”Bold” Grid.Row=”2″ Grid.Column=”0″>Products</TextBlock>
17 <TextBlock Grid.Row=”2″ Grid.Column=”1″>100000</TextBlock>
18 <TextBlock Grid.Row=”2″ Grid.Column=”2″>150000</TextBlock>
19 </Grid>
You need to create the application window. Which code fragment should you insert at line 12?
What should you do?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application that connects to a database by using the Entity Framework.
You create an Entity Data Model (EDM) by using the Generate from database wizard for the following tables.
You need to ensure that the EDM contains an entity type named Employee that contains all of the data from both tables.
What should you do?
Which two actions should you perform?
You are implementing an ASP.NET page that hosts a user control named CachedControl.
You need to ensure that the content of the user control is cached for 10 seconds and that it is regenerated when fetched after the 10 seconds elapse.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
What should you do?
You deploy an ASP.NET application to an IIS server.
You need to log health-monitoring events with severity level of error to the Windows application event log.
What should you do?