Which declaration should you use?
You create a Web page that contains the following code. (Line numbers are included for reference only.)
01 <script>
02 function changeColor(c) {
03 message.style.color = c;
04 }
05 </script>
07 <p id=”message”>Welcome!</p>
08 <ul id=”color”>
09 <li>Black</li>
10 <li>Red</li>
11 </ul>
You need to ensure that when the user clicks an item in the list, the text color of the “Welcome!” message will change.
Which declaration should you use?
Which two actions should you perform?
You are implementing an ASP.NET application that makes extensive use of JavaScript libraries. Not all pages use all scripts, and some scripts depend on other scripts. When these libraries load sequentially, some of your pages load too slowly. You need to use the ASP.NET Ajax Library Script Loader to load these scripts in parallel. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
How should you design the validation?
You are designing an application by using Windows Presentation Foundation (WPF), Microsoft .NET Framework 4, and Microsoft SQL Server 2008. The application will contain several forms that include custom data validators. You need to ensure that data is validated before the database updates occur. You also need to ensure that the validation logic can be reused. How should you design the validation?
Which code segment should you use?
You use Microsoft .NET Framework 4.0 and the Entity Framework to develop an application.
You create an Entity Data Model that has an entity named Customer. You set the optimistic concurrency option for Customer.
You load and modify an instance of Customer named loadedCustomer, which is attached to an ObjectContext named context.
You need to ensure that if a concurrency conflict occurs during a save, the application will load up-to-date values from
the database while preserving local changes. Which code segment should you use?
What should you do?
You are building an ASP.NET control.
The control displays data by using a table element with a class attribute value of Results.
The control should expose a client-side event named onrowselected that fires when a check box in a table row is selected.
You need to implement this client-side event.
What should you do?
?Update panels pnlA and pnlB must refresh their content only when controls that they contain cause a postback.
You are implementing an ASP.NET AJAX page. You add two UpdatePanel controls named pnlA and pnlB. pnlA contains an UpdatePanel control named pnlAInner in its content template.
You have the following requirements.
?Update panels pnlA and pnlB must refresh their content only when controls that they contain cause a postback.
?Update panel pnlAInner must refresh its content when controls in either pnlA or pnlB or pnlAInner cause a postback.
You need to configure the panels to meet the requirements.
What should you do?
What should you do?
You are designing an application by using Windows Presentation Foundation (WPF) and Microsoft .NET Framework 4. The application allows users to view product details. Product managers can modify the product details for the products that they manage. You plan to design the application by using the ModelViewViewModel (MVVM) pattern. You need to ensure that the product details can be viewed by all users and modified only by product managers. What should you do?
Which code segment should you use?
You use Microsoft .NET Framework 4.0 to develop an ASP.NET 4 Web application.
You need to encrypt the connection string information that is stored in the web.config file. The application is deployed to multiple servers.
The encryption keys that are used to encrypt the connection string information must be exportable and importable on all the servers.
You need to encrypt the connection string section of the web.config file so that the file can be used on all of the servers.
Which code segment should you use?
Which code segment should you use?
You create a Web page that contains the following code.
<script type=”text/javascript”>
var lastId = 0;
</script>
<div class=”File”>
Choose a file to upload:
<input id=”File0″ name=”File0″ type=”file” />
</div>
<input id=”AddFile” type=”button” value=”Add a File” />
<input id=”Submit” type=”submit” value=”Upload” />
You need to provide the following implementation.
* Each time the AddFile button is clicked, a new div element is created.
* The new div element is appended after the other file upload div elements and before the AddFile span.
* Each new element has a unique identifier.
Which code segment should you use?
Which GridView event should you handle?
You are implementing an ASP.NET application. The application includes a Person class with property Age. You add a page in which you get a list of Person objects and display the objects in a GridView control. You need to add code so that the GridView row is highlighted in red if the age of the person is less than 18.
Which GridView event should you handle?