MCTS Self-Paced Training Kit (Exam 70-526): Microsoft .NET Framework 2.0 Windows-Based Client Development (Hardcover)
- Thursday, July 24, 2008, 6:27
- Study Guide
- 12 views
- Add a comment
Get in-depth preparation for Exam 70-526, an exam for the new MCTS: .NET Framework 2.0 Windows Application certificationand build real-world job skills. Includes test questions, reviews, troubleshooting labs, an exam discount, and more.
From the Publisher
Key Book Benefits:- Comprehensive study guide written by exam-certified authors – Deeper, more focused coverage of exam objectives and sub-objectives-plus instructive case studies and troubleshooting scenarios to enhance your performance on the job – 425 practice questions on CD – Test engine that enables customized testing, pre-assessment and post-assessment, and automated scoring and feedback – Complete objective-by-objective review section, plus a tear-out exam-mapping grid – Exam tips based on real-world test experience – 90-day evaluation version of Visual Studio 2005 Professional Edition – 15 percent exam discount voucher from a leading authorized testing center (limited time offer) – Microsoft Encyclopedia of Networking, Second Edition, eBook – Practice files on CD – Entire study guide in searchable eBook format
About the Author
Matthew Stoecker is the author of MCAD/MCSD Self-Paced Training Kit: Developing Windows-Based Applications with Microsoft Visual Basic .NET and Microsoft Visual C# .NET. Matthew works for Microsoft Corporation on the Visual Studio team.
Steve Stein works for Microsoft on the Visual Studio team.
Tony Northrup is a professional consultant and writer with dozens of books to his credit. He has authored several Microsoft Training Kits and is a coauthor of MCTS Self-Paced Training Kit (Exam 70-536): Microsoft .NET Framework 2.0—Application Development Foundation.
hxxp://www.certbible.org
QUESTION 1
You work as the Web developer at Certkiller .com. You are developing a new ASP.NET application
that contains a page named Collections.aspx. Your ASP.NET application uses a Microsoft SQL Server
database.
Collections.aspx will be used in the Finance department, and contains a DataGrid control named
AgedCollections. AgedCollections is used to show collections aging information. The HTML code for
AgedCollections is:
Actualtests.org - The Power of Knowing
AutoGenerateColumns="True">
A Page.Load event handler is implemented for Collections.aspx. AgedCollections is bound by the SQL
statement shown here:
SELECT AccountName, TotalAmountDue, DaysPastDue FROM
tblCollections ORDER BY AccountName
You want to modify the display formatting of Collections.aspx with the aim of improving how users
identify account collections which are overdue by three months. All account collections that are older
than 90 days must be displayed in green.
What should you do next?
A. Add this code to the ItemDataBound event handler for AgedCollections:
If CType(CType(e.Item.Controls(2), TableCell.Text,_
Integer)>90 Then
CType(e.Item.Controls(2), TableCell).ForeColor=_
System.Drawing.Color.Green
End If
B. Add this code to the DataBinding event handler for AgedCollections:
Dim dg As DataGrid
dg = CType(sender,DataGrid)
If CType(CType(dg.Controls(2), TableCell).Text,_
Integer)>90 Then
CType(dg.Controls(2), TableCell).ForeColor=_
System.Drawing.Color.Green
End If
C. In the asp:DataGrid HTML element for AgedCollections, update the AutoGenerate attribute to
“False”.
Add this HTML code within the open and close tags of AgedCollections:
ForeColor=System.Drawing.Color.Green”/>
“False”.
Add this HTML code within the open and close tags of AgedCollections:
< %# DataBinder.Eval(Container.DataItem, "DaysPastDue",
"If DataItem.Value>90 Then ForeColor=
System.Drawing.Color.Green”)%>
Actualtests.org – The Power of Knowing
Explanation: The ItemDataBound event is raised after an item is data bound to the DataGrid control. This
event provides you with the last opportunity to access the data item before it is displayed on the client. We
add code to the event handler for this event which displays entries older than 90 days in green.
Reference: .NET Framework Class Library, DataGrid.ItemDataBound Event [Visual Basic]
QUESTION 2
You work as the Web developer at Certkiller .com. You are developing a new Web custom control
named Toggle, which contains a Button control named toggleButton. Users will be able to turn Toggle
off and back on. You develop an event handler named toggleButton_Click, which changes the
BorderStyle property to indicate if the Button is on or off.
You decide to configure code for the Toggle class. Your code must ensure that when toggleButton is
clicked by users, all pages that have instances of Toggle are able to process custom event handling
code. To perform this task, you implement this code for the Toggle class:
Public Event ChangedValue(sender As Object, e As EventArgs)
Protected OnChangedValue(e As EventArgs)
RaiseEvent ChangedValue(Me, e As EventArgs)
End Sub
To complete your code segment, you must write code for toggleButton_Click to ensure the following:
• Pages that have instances of Toggle must be able to process the ChangedValue event.
• Pages that have instances of Toggle must be able to process custom event handling code.
Which code should you add to the toggleButton_Click? Choose two correct answers. Each correct
answer presents only part of the complete solution.
A. AddHandler sender.click, AddressOfChangedValue
B. AddHandler sender.Click, AddressOfOnChangedValue
C. OnChangedValue(EventArgs.Empty)
D. ChangedValue(Me, EventArgs.Empty)
Answer: B, C
Explanation:
B: To wire your event handler to the instance, you must create an instance of EventHandler that takes a
reference to OnChangedValue in its argument and add this delegate instance to the Click event.
C: We can invoke the OnChangedValue event. We must use only the EventArgs parameter.
Note: To consume an event in an application, you must provide an event handler (an event-handling
method) that executes program logic in response to the event and register the event handler with the event
source. This process is referred to as event wiring.
Reference:
C# Programmer’s Reference, Events Tutorial
.NET Framework Developer’s Guide, Consuming Events [Visual Basic]
Incorrect Answers
Actualtests.org – The Power of Knowing
A: We must use the OnChangedValue event.
D: We should specify only the EventArgs parameter.
Free download:pass4sure Microsoft 70-526
Free download:testking Microsoft 70-526
password:www.certbible.org
High quality IT Certification Training Exam Questions, Study Guides and Practice Tests are in Downloadable PassGuide Testing Engine,Successful for IT Certification or Full Refund for you.Contact Us:Sales@PassGuide.com|
Type |
Exam Bible | New Questions & Answers |
Latest Updated |
Download link |
| All Certbible 's Exam Dumps |
597 |
1 days ago | Available |
PassGuide Training Materials & Practice Tests
About the Author
Write a Comment
Gravatars are small images that can show your personality. You can get your gravatar for free today!

