You are on page 1of 41

SYBEX Index

®
Visual Basic .NET
Developer's Handbook™
Evangelos Petroutsos; Mark Ridgeway

Index

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved. No part of this
publication may be stored in a retrieval system, transmitted, or reproduced in any way, including but not limited to
photocopy, photograph, magnetic or other record, without the prior agreement and written permission of the publisher.

ISBN: 0-7821-2879-3

SYBEX and the SYBEX logo are either registered trademarks or trademarks of SYBEX Inc. in the USA and other
countries.

TRADEMARKS: Sybex has attempted throughout this book to distinguish proprietary trademarks from descriptive terms
by following the capitalization style used by the manufacturer. Copyrights and trademarks of all products and services
listed or described herein are property of their respective owners and companies. All rules and laws pertaining to said
copyrights and trademarks are inferred.

This document may contain images, text, trademarks, logos, and/or other material owned by third parties. All rights
reserved. Such material may not be copied, distributed, transmitted, or stored without the express, prior, written consent
of the owner.

The author and publisher have made their best efforts to prepare this book, and the content is based upon final release
software whenever possible. Portions of the manuscript may be based upon pre-release versions supplied by software
manufacturers. The author and the publisher make no representation or warranties of any kind with regard to the
completeness or accuracy of the contents herein and accept no liability of any kind including but not limited to
performance, merchantability, fitness for any particular purpose, or any losses or damages of any kind caused or alleged
to be caused directly or indirectly from this book.

Sybex Inc.
1151 Marina Village Parkway
Alameda, CA 94501
U.S.A.
Phone: 510-523-8233
www.sybex.com
Index

Note to the reader: Throughout this index boldfaced page numbers indicate primary discussions of
a topic. Italicized page numbers indicate illustrations.

of Nodes collection, 358


Symbols of Rows collection, 116–117
Add New Item dialog box, 10, 10
#Const directive, 455
Add Reference dialog box, 289, 290, 471, 471
#If...Then...#Else directives, 455
for custom control, 540
_lastError private variable, 220, 223, 226
Add Web Reference dialog box, 52, 53, 289, 290,
291, 837, 842
A AddItem method, 347
AddNew method, of BindingManagerBase class,
Abort method, of thread, 405 173, 182
abstraction, 480–481 AddressList property, of IPHostEntry
Academic version of Visual Studio .NET, 6 class, 702
Accept/Reject rule for DataSet, 92 ADO.NET, 58
AcceptChanges method of DataRow object, disconnected architecture, 58–75
109, 116 layers, 61, 61–65
implications of using, 138–139 transactions, 160–168
and row versions, 138 XML support, 130
AcceptTcpClient method, of TcpListener class, ADOTests project, 65
717, 718 commands and stored procedures,
action queries, 69 67–69
ActiveMdiChild property, of form, 337, 338 connections, 66–67
ActiveX Data Object (ADO), 58 Data Adapter to populate DataSet,
Add DataSet dialog box, 136, 136, 291, 292, 803, 73–75
803, 844 data retrieval with DataReader, 71–73
Add Member Function Wizard, for C++ ExploreDataSet() subroutine, 110–111
component, 283, 283 ExploreRelations() subroutine, 112–114
Add method Show Row Versions, 146–149
of Columns collection, 362 ShowCurrentValues() subroutine, 148
of Items collection, 347, 465 ShowOriginalValues() subroutine, 147–148

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
942 ADOTransactions project—ASP.NET

ADOTransactions project, 161–165 client/server, 214


AdRotator mobile control, 887, 899–901 database, creating, 34–44, 45
AdRotator Web control, 602, 667 Debug and Release versions, 439–441
ASPX code for, 674 design phase, 278
in e-commerce application, 651–652 distributed, 59
Advanced Options dialog box, 42, 43 distributing, 456–459
Advanced SQL Generation Options dialog box, MDI, 331, 331–339
80, 81, 151 active child form access, 337, 337–338
AfterSelect event, of TreeView control, 205 Window menu, 339
Aliases property, of IPHostEntry class, 702 multiple form, 314–319
Alignment property, of ListView need for threads, 401
control, 360 responsiveness with multithreading,
AllowDBNull property, of DataColumn 409–413
object, 126 scaling up, 215
AllowDelete property, of DataView security, 13–14
object, 122 tiers, 214
AllowDrop property, of controls, 326 middle tier, 218–227
AllowEdit property, of DataView object, 122 presentation tier, 227–233
AllowNew property, of DataView object, 122 Windows interface styles, 305–306
AmbientValue attribute, of custom control ArrayList class
member, 553 class inheriting from, 508–509
Analysis Manager, 927, 928 constructor, 467
analysis services for SQL Server 2000, ArrayList, serializing, 374
927–928 arrays
Anchor property, 300–303 of bytes, converting strings to, 705
AnchorStyles enumeration, 301 data binding DropDownList Web
Anonymous authentication, 859 control to, 747
anti-alias technique, 397 implementing properties as, 562,
AppendText method, of TextBox control, 343 562–563
application-level tracing, 638 initializing, 467
Application Property Pages dialog box, 15–16, 16 .asp file extension, 236
application state, vs. session state, 693 ASP.NET. See also e-commerce application with
ApplicationException class, 477–478 ASP.NET
applications. See also e-commerce application application generation of new session, 693
with ASP.NET cache management, 639–641
attaching debugger to running and/or for application data, 640
remote, 445 fragment caching, 602, 641, 657–658
caching data, 639–641 output caching, 640–641, 689
client for SQLXML Web service, 52–55 ViewState, 641

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
ASP.NET impersonation—border, for custom control 943

configuration settings for application, AutoScrollMargin property, of form, 310–311


636–639 AutoScrollMinSize property, of form, 311
data adapters and, 239
data binding in, 239–244
Data Form Wizard, 240, 240–244, B
241, 243
debug and release version issues, 440–441 background color, of controls, properties
for n-tier applications, 278 for, 534
security issues, 13 BackgroundImage property, of UserControl
ASP.NET impersonation, 856 object, 544, 545
ASPX pages, 236–239 base classes, and inheritance, 21
for n-tier applications, 278 Basic authentication, 859
assembly, 11 Bcc property, of MailMessage class, 731
AssemblyInfo.vb file, 639 BeginGet Response method, of
Assert method, of Debug class, 449, 449–451 HttpWebResponse class, 710
Attach to Process dialog box, 445, 446, 597, 597 BeginTransaction method, of Connection
Attachments property, of MailMessage class, 731 object, 162
attributes BINARY BASE64 modifier, for XML mode, 826
of custom control members, 553–555 Binary Formatter class, 495
of XML tags, 790 BinaryFormatter, 374–375
authentication Bindable attribute, 570
vs. authorization, 854 of custom control member, 553
in Windows, 67 BindingContext object, 173–175
in XML Web service, 849–851 BindingContext property, of form, 182–183
Authentication Methods dialog box, 849, BindingManagerBase class, 173–174
849, 858 PositionChanged event, 180
<authentication> tag in Web.config file, 638 blocking threads, 406–407
<authorization> tag in Web.config file, 638, Body property, of MailMessage class, 731
863–864 BodyEncoding property, of MailMessage
authorization, vs. authentication, 854 class, 731
Auto Format dialog box, for DataList BodyFormat property, of MailMessage
control, 756 class, 732
Auto Hide, for IDE windows, 7 BookStore class
AUTO mode, for SQL Server query results, 821 compare methods for, 511–513
AutoIncrement property, of identity creating, 482–487
column, 153 inheriting, 496–500
AutoLog property, of Windows service, 584 iterating through, 515
Autos window for debugging, 451 persisting, 489–490
AutoScroll property, of form, 310 border, for custom control, 541

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
944 Border3Dsize property, of SystemInformation object—CheckBoxList Web control

Border3Dsize property, of SystemInformation CAL (Client Access License), for SQL Server
object, 308 2000, 924
BorderSize property, of SystemInformation Calendar Auto Format dialog box, 606, 607
object, 308 Calendar mobile control, 887
BorderStyle property, of Splitter control, 305 Calendar Web control, 602, 606, 606–608
Bounds property, of PageSettings object, 388 Call Stack window for debugging, 451
<br> tag (HTML), 758 callback functions, 515–516, 519
Breakpoint Hit Count dialog box, 444, 444 Cancel button, 410
breakpoints, 441, 442–444 CancelCurrentEdit method, of Binding-
conditional, 444–445 ManagerBase class, 173, 183
Breakpoints window for debugging, 451 CanConvertFrom method, of Expandable-
Browsable attribute, of custom control ConverterObject class, 565
member, 554 CanConvertTo method, of Expandable-
Browse With dialog box, 238 ConverterObject class, 565
Build menu CanDuplex property, of PrinterSettings
➢ Build Contact, 540 object, 388
➢ Configuration, 439 CanHandlePowerEvent property, of Windows
business logic service, 584
application layer for, 215 CanPauseAndContinue property, of Windows
for mobile web application, in Code service, 584
Behind, 892 CanShutDown property, of Windows
in n-tier applications, 274–275 service, 584
in two-tier systems, 274 CanStop property, of Windows service, 584
Button HTML control, 604 CanUndo property, of TextBox control, 344
Button Web control, 602 Caption property, implementing, 546
CaptionColor property, implementing, 546–547
CaptionHeight property, of SystemInformation
C object, 308
Cascade setting for DataSet rules, 92
C++ component cascading style sheets, from Visual Studio,
for n-tier applications, 282–284 663–664
calling, 295 case sensitivity of XML, 638
setting Text property to, 292 Category attribute, of custom control
CAB file, 459 member, 554
cache management, 639–641 Cc property, of MailMessage class, 732
for application data, 640 chat application, 717–723, 718
output caching, 640–641, 689 CheckBox HTML control, 604
and performance, 642 CheckBox Web control, 602
ViewState, 641 CheckBoxList Web control, 603

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
CheckedListBox control—Columns collection 945

code to load XML data file contents into, 675 client certificates, 860
data binding to database, 748–754, 750 client/server applications, 214–215
vs. RadioButtonList control, 668 client-side controls, 605
CheckedListBox control, 346 Clip property, of Graphics object, 394
child forms in MDI application, 332 Clipboard Ring, 9, 659
accessing active, 337–338 clipboard, TextBox control methods for copy
MDIParent property of, 334 and paste, 345–346
ChildTable property, of DataRelation Close method
objects, 111 for connection, 66
Choose a ReportDocument dialog box, for of TcpClient class, 716
Crystal Reports, 780 CLR (Common Language Runtime), 11
chunking, 895 CLS (Common Language Specification), 13
Class keyword, 469 Code Behind view, 10
classes, 464–469. See also objects for n-tier applications, 278
building new, 469–503 code editor window
BookStore class, 482–487 brown dot in margin, 442
error handling, 477–479 line number display, 442
implementing properties, 470–477 code, non-interruptible block, 430
inheritance, 492–501 code snippets, Clipboard Ring to store, 9
inheritance modifiers, 501–503 COFF (Common Object File), 11
instance and shared members, Collate property, of PrinterSettings
479–492 object, 388
creating instance of, 465 Collect method, for garbage collection, 13
delegates, 515–528 Collection Editor, 561
inheritance, when to use, 508–509 Collection object, 465
interfaces, 503–515 collections
IComparable and IComparer interfaces, objects implementing, 510
509–513 properties, 484–490
IEnumerable, 513–515 Color property, of PageSettings object, 388
implementation, 25 ColumnChanged event, of DataTable
role in Visual Basic .NET, 464 object, 175
Clear method, 469 ColumnChanging event, of DataTable
Client Access License (CAL), for SQL Server object, 175
2000, 924 ColumnHeader Collection editor, 361, 361
client application ColumnHeader objects, 362
for distributed applications, 59 ColumnHeaderStyle enumeration, 360
for SQLXML Web service, 52–55 ColumnName property, of DataColumn object,
for XML Web service, 842–846 108, 126
Client Certificate Request, for SSL, 864 Columns collection, 362

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
946 columns in tables—constructors

columns in tables. See also DataColumn objects compiling services, 596


accessing, 108–109 components, names for, 294
Constraint objects for, 106 composite control, 533
saving as attribute in XML file, 133 computer Properties dialog box, Network
COM Interop Services, 277 Identification tab, 701
COM technology, 276 ComputerName property, of SystemInformation
ComboBox control, 346 object, 308
binding to data source, 194–195 concurrency
Command class, 62 optimistic, 80, 97–103
command-line compiler, 4 DataAdapter handling of, 150
command line, debugging from, 452–456, 453 and row versions, 138
conditional compiling, 452, 455–456 turning off, 99
Command mobile control, 887, 896 pessimistic, 99–101
Command objects conditional breakpoints, 444–445
to call stored procedures, 68–69 conditional compiling, 4, 452, 455–456
to execute queries, 67–69 Configuration Manager dialog box, 439, 440
Command Prompt window, 701, 701 Configuration Properties dialog box, 439, 440
Command window for debugging, 443, 451 Configure IIS Support snap-in, 45, 46
CommandText property, of SQLCommand Configure SQL XML Support in IIS
object, 67 utility, 822
CommandType property Connect method
of DataSet Command objects, 82 of TcpClient class, 715–716
of SQLCommand object, 67 of UdpClient class, 724
common dialog boxes, 317 Connection class, 62
Common Language Runtime (CLR), 11 Connection object
Common Object File (COFF), 11 adding, 75–78
Common Type System (CTS), 11 BeginTransaction method of, 162
Compare method, 503, 511 Connection property, of DataSet Command
Comparer object, 510 objects, 82
comparers, custom, for sorting ListView control, connection string, for Connection object, 77
370–373 connections for ADO.NET, 58–59
CompareTo method, 503, 510 ConnectionString property, for connection, 66
CompareValidator mobile control, 887, 896 #Const directive, 455
CompareValidator Web control, 603, 624 constituent controls, 534
<compilation> tag in Web.config file, 638 Constraint objects, for columns in tables, 106
compiler, command-line, 4 constructors
compiling in .NET, 11–13 implementing, 474–475
Code Behind and, 892 to initialize objects, 467–469
conditional, 452, 455–456 in Visual Basic, 25–26

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
container control—custom controls 947

container control copying and pasting, TextBox control methods


dynamically adding controls to, 615 for, 345–346
empty, 612–616 Count property
Contains method, of Items collection, 351 of BindingManagerBase class, 173
context menus, creating, 320 of Items collection, 347
Control Panel, Administrative Tools folder, CPU (central processing unit), multithreaded
Services utility, 580, 580 application use of, 400
controls. See also custom controls; data binding; Create Database dialog box, 35, 35, 245
HTML controls; Web Forms controls Crystal ReportGallery dialog box, 777
AllowDrop property, 326 Crystal Reports, 561
Anchor property, 300–303 Standard Report Expert
constituent, 534 Data tab, 778
determining type, 313 Fields tab, 779
hidden, for storing information, 334, CrystalReportViewer control, 776–782, 781
696–697 to access report, 779–782
in Mobile Internet Toolkit (MIT), 886–887 adding, 779–782
types, 533 WebDataDemo5 project, 777–779,
Visible property of, 312 782, 783
what it is, 532–533 CrystalReportViewer Web control, 603
Controls collection, 312–313 CTS (Common Type System), 11
Convert() function, 122 Currency violation: error message, 150
ConvertFrom() function, of TypeConverter Current method, of IEnumerator interface, 514
class, 567 Current property, of IEnumerator object, 350
ConvertFrom method, of ExpandableConverter- current version of row in DataSet, 138, 140
Object class, 565 CurrentChanged event, of BindingManagerBase
ConvertTo() function, of TypeConverter class, 174
class, 567 Cursor property, of Splitter control, 305
ConvertTo method, of ExpandableConverter- CursorSize property, of SystemInformation
Object class, 565 object, 308
cookieless attribute, in <sessionState> tag, 638 custom controls, 533–555
cookies attributes, 553–555
forms-based authentication with, 868 attributes of members, 553–555
and mobile applications, 902 Contact control, 534, 534–541
persistent, 695, 874 data-bound controls, 570–578
security for, 861 DBControl, 571, 571–578
SessionID storage in, 693 exposing properties for, 540–541
to store session information, 695–696 inheriting existing controls, 555–561
cooperative multitasking, 400 names, changing during design phase, 543
Copies property, of PrinterSettings object, 388 overriding OnPaint event handler, 548–549

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
948 custom type editors—data-bound Web controls

redrawing as resizing, 541 Customers project, 177–191, 178


user-drawn control, 541–553, 542 editing current row, 182–184
custom type editors, 561–570 navigating rows, 181–182
array properties, 562–563 updating data source, 184–191
type converters, 563–570 DataTable events, 175–177
<customErrors> tag in Web.config file, 638 navigational model improvements, 191–199
Customers project, 177–191, 178 Products project, 192, 192–199
Data menu, 184, 186 coding, 195–197
deleted rows, 187 committing changes to database, 197–199
editing current row, 182–184 data-bound form design, 194–195
navigating rows, 181–182 product selection by name, 193–194
updating data source, 184–191 SQL Server data to DataGrid control, 829–830
View Changes menu, 185, 188–190 viewing related tables, 199–214
CustomValidator mobile control, 887 DataSets vs. queries, 201–202
CustomValidator Web control, 603, 625, ViewCustomerOrders project, 200,
627–628 202–209
ViewProducts project, 200, 209–214
data-bound application
D Products NonBound project, 217, 217–233
middle tier, 218–227
data presentation tier, 227–233
exchanging between forms, 316 tiers, 214–233
passing between threads, 413–417 data-bound controls, 570–578
Revised ThreadDemo project, 414–417 DBControl, 571, 571–578
Data Adapter Configuration Wizard, 755 testing, 577, 577–578
advantage, 83 data-bound Web controls
Choose a Query Type screen, 40, 41, 78, 79 basics, 744
Choose Your Data Connection screen, CrystalReportViewer control, 776–782, 781
40, 40 adding, 779–782
Create Stored Procedures screen, 260, 261 WebDataDemo5 project, 777–779,
Generate the SQL Statements screen, 41, 782, 783
41–42, 78, 79, 151 DataGrid Web control, 768–774
Generate the stored procedures screen, 259, master/detail form, 772–774, 774
259–260 pagination, 771–772
Data Adapter Preview dialog box, 42, 43 property builder dialog box, 770
data binding, 172–214 WebDataDemo3 project, 770, 771
in ASP.NET, 239–244 DataList Web control, 754–768
Data Form Wizard, 240, 240–244, 241, 243 WebDataDemo2 project, 755–761, 756,
BindingContext object, 173–175 762, 764

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
data cubes—DataGrid control 949

WebDataDemo2 project Code Behind, configuration, 77–83


763–768 ContinueUpdateOnError property, 93
list controls, 745–754 to populate DataSets, 73–75
CheckBoxList to database, 748–754, 750 for transactions, 165–168
DropDownList to array, 747 DataAdapters project, 88, 88–90, 89
ListBox to XML document, 745–746, 746 database
Repeater Web control, 774–775 adding record, 751
data cubes, 927 clearing DataSet after committing to, 156
data entry committing DataSet changes to, 90–91,
control for populating list from, 571–578 197–199
populating ListBox control based on, data binding CheckBoxList Web control to,
575–576 748–754, 750
data exchange format, XML as, 60, 129 deleting record, 752–753
Data Form Wizard, 240, 240–244, 241, 243 establishing connection, 66–67
completing process, 244 mobile application to access, 902–918
Data Link Properties dialog box, 76 login page, 903–909, 906
Connection tab, 76 MobileWebForm1, 909–918
Data Links window, 66 planning, 903
Data menu, ➢ Configure Data Adapter, 78 rationale, 903
data mining, 927 updating from DataSet, 149–168
data provider for ADO.NET, 61 handling identity columns, 152–160
Command class, 62 updating record, 753–754
Connection class, 62 using DataSet without, 125–129
DataAdapter class, 63 for web applications, creating, 245–249
DataReader class, 63 Database Designer, 31, 32
data source attribute, of ConnectionString database diagrams, 77
property, 66 database engine, for SQL Server 2000, 926
data tier of application, 214 database management. See SQL Server 2000
Data Transformation Services, 928, 929, 930 DataBind method, 744
data transmission, wireless device DataBinder.Eval method, 744
limitations, 886 DataBindings dialog box, 260, 261, 262
data validation, 97 DataColumn objects, 106
in custom control, 536–537 properties, 108, 126
Data View window, for XML files, 648 DataEntry project, 535–541
data warehousing, 927 DataGrid control, 40, 88, 88–90, 89
DataAdapter class, 63 binding SQL Server data to, 829
architecture, 74 binding to custom DataSet, 134
building object in code, 101–103 binding view to, 122–124
Command objects, 81–83 icon for row error, 96, 96

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
950 DataGrid Web control—DataSet object

limitations, 200 clearing after committing to database, 156


to view DataSet contents, 128, 128 code to implement components, 117
DataGrid Web control, 603, 744, 768–774 committing changes to database, 90–91
customizing appearance, 804–805 configuring, 83–87
master/detail form, 772–774, 774 creating, 83–87
pagination, 771–772 in code, 125–129
property builder dialog box, 770 with structure from XML schema, 803
WebDataDemo3 project, 770, 771 DiffGram of edited, 798, 799–800
DataItem property, 346 editing, 115–118
DataList Web control, 603, 744, 754–768 establishing relations in, 84–87
WebDataDemo2 project, 755–761, 756, Merge method of, 120
762, 764 populating, 87, 179
Code Behind, 763–768 populating based on data entry, 571–578
DataReader class, 63 printing contents, 120–121
closing object, 72 vs. queries, 201–202
for data retrieval, 71–73 refreshing, 80
from server, 69 relationships, 111–115
vs. DataSet class, 69 ExploreAllRelations() subroutine,
DataRelation objects, 65, 106 114–115
DataRow objects, 106 ExploreRelations() subroutine, 112–114
creating, 127–128 row versions, 138, 139–140
Delete method, 116 size recommendations, 139
properties, 109 sorting, filtering and searching rows,
Remove method of, 116 118–129
RowState property of, 140–145 finding rows by ID, 124–125
DataRowState enumeration, 140–141 Select method for, 118–122
DataRowVersion enumeration, 140 with views, 122–124
DataSet class, 64–65 strongly typed, 107
architecture, 64 vs. not strongly typed, 129
vs. DataReader class, 69 structure, 106–107, 107
populating with DataAdapters, 73–75 updates, common problems, 91–93
DataSet object, 58, 60, 61 updating data source, 149–168
accepting and rejecting changes, 138–149 handling identity columns, 152–160
row states, 140–145 viewing and editing, 87–97
row versions, 139–140 viewing contents, 755
viewing row versions and states, 146–149 in XML format, 792
access to tables, 107–115 and XML, 129–137, 130, 790–800
columns of DataTable, 108–109 controlling XML file structure, 132–134
ExploreDataSet() subroutine, 110–111 DiffGram of edited DataSet, 799–800
rows of DataTable, 109–111 loading XML into DataSets, 795–796

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
DataSet property, of XmlDataDocument object—delegates 951

LoadXML project, 796–798, 797 Debug mode, disabling, 642


persistence, 131–134 debugging, 438
relationships between DataSet tables, basics, 441–452
793–794 attaching to running and/or remote
XML schemas, 134–137 program, 445
XMLData project, 791, 791–795 breakpoints, 442–444
in XML format, 787 conditional breakpoints, 444–445
XML view of, 131–132 Debug and Trace classes, 447–449
DataSet property, of XmlDataDocument Debug.Assert method, 449, 449–451
object, 810 Debugging project, 442
DataSource property debugging windows, 451–452
of data-bound Web control, 744 multiple processes, 446–447
of ListBox control, 353 changes with VB .NET, 438–439
DataTable objects, 64, 74–75, 106 from command line, 452–456, 453
columns as properties, 108 conditional compiling, 452, 455–456
events, 175–177 multithreaded applications, 400, 401, 430
Import method of, 120 versions for debug and release, creating,
NewRow method of, 117 439–441
order of rows, 118 Windows services, 595–597
PrimaryKey property of, 127 Debug.Print method (Visual Basic), 439
referential integrity and order of populating, 87 decompiling code, and security, 13
Rows collection of, 109–111 default class members, overriding, 490–492
DataType property, of DataColumn object, default row version in DataSet, 139–140
108, 126 DefaultEvent attribute, of custom control
DataView object, 118, 122–124 member, 554
DataViewRowState enumeration, 119 DefaultPageSettings property
Date data type, 467 of PrintDocument object, 385
DBControl, 571, 571–578 of PrinterSettings object, 388
deadlock in multithreading, 431 DefaultProperty attribute, of custom control
Debug class, 439, 447–449 member, 554
Assert method, 449, 449–451 DefaultValue attribute, of custom control
Indent statement, 449 member, 554
WriteLine statement, 448–449 DefaultValue property, of DataColumn object,
Debug menu 108, 126
➢ New Breakpoint, 441 DELE command (POP3), 734
➢ Start New Instance, 447 delegates, 515–528
➢ Step Into, 443 custom class with, 517–522
➢ Step Out, 443 need to declare, 516
➢ Windows, 451 in Visual Basic, 25

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
952 Delegates project—Dynamic Host Configuration Protocol (DHCP)

Delegates project, 517–522 disk drives


delegation, as impersonation level, 862 SQL Server 2000 requirements, 925, 935
Delete method, of DataRow object, 109, 116 for Visual Studio, 7
DELETE statement DisplayMember property, of controls,
preventing generation, 80 355, 356
in transaction, 166 Dispose statement, 26
DeleteCommand object, 74 distributing application, 456–459
of DataAdapter object building in code, 101 divide-by-zero error, Try...Catch...Finally block
deleting record in database, 752–753 for, 17–21
deployment, 438 Dock property, 303
with Mobile Internet Toolkit (MIT), DocumentSource property, of XML control, 809
901–902 DoDragDrop method, 327–328
derived classes, and inheritance, 21 DoEvents function, 400
Description attribute, of custom control dotted-quad notation, 700
member, 554–555 DoublClickTime property, of SystemInformation
Design view, 10 object, 309
for web applications, 237, 238 DoubleClickSize property, of SystemInformation
DesignOnly attribute, of custom control object, 309
member, 555 DownloadData method, of WebClient class,
Desktop Engine edition of SQL Server 704, 706
2000, 923 DownloadFile method, of WebClient class,
desktop shortcuts, creating in Setup Wizard, 458 704, 707
destructors, in Visual Basic, 25–26 downloading code, 301
Developer edition of SQL Server 2000, 923 downloading documents, methods for, 706–707
DeviceSpecific mobile control, 887, drag and drop operations, 326–331
897–898, 898 DragDrop project, 329, 329–331
DHCP (Dynamic Host Configuration DragDropEffects enumeration, 327
Protocol), 701 DrawMode property, of ListBox control, 326
dialog boxes, 317–319 DrawString method, 383, 393–394
DialogResult enumeration, 318 DropDown HTML control, 604
DiffGram of edited DataSet, 798, 799–800 DropDownList Web control, 603
diffusion algorithm for image processing, 425 data binding to array, 747
Digest authentication, 859 Duplex property, of PrinterSettings object, 389
digital signatures, 14 dynamic context-based help, 10
directory and file permissions, 855–856 dynamic discovery files, 836
Disassembly window for debugging, 452 dynamic forms, Controls collection for
.disco file extension, 836 building, 313
Discovery, 836 Dynamic Host Configuration Protocol
discovery files for XML Web service, 840–842 (DHCP), 701

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
e-commerce application with ASP.NET—enumerations 953

embossing algorithm for image processing, 425


E emulators to test mobile applications, 881
obtaining, 882
e-commerce application with ASP.NET
enableSessionState property, for Web form, 694
AdRotator Web control, 651–652
encapsulation, 481–484
e-mail message, 684–685, 693
inheritance and, 493
fragment caching, 657–658
Encoding property, of MailAttachment
planning, 646–647, 647
class, 732
running, 691, 692
encryption, 482
template form, 658–662, 662
setting level for SSL, 864, 865
user controls, 652–658
in XML Web service, 852
Header2.ascx, 656, 656–657
End Class statement, 469
Header.ascx, 653–656, 655
End Interface statement, 25
WebForm1 for main data entry, 667–678,
EndCurrentEdit method, of BindingManager-
673, 678
Base class, 173, 182, 183
WebForm2 for order confirmation, 678–686,
EndGetResponse method, of HttpWeb-
682, 683
Response class, 710
ButtonConfirm_Click, 684–685
English Query, 930
page load, 683–684
Enter key, control detection and response to
WebForm3 for notification of order
press, 576–577
placement, 686–688, 687
Enterprise Architect version of Visual Studio
WebForm4 for company details,
.NET, 6
689–691, 690
Database Designer, 31
XML documents for data, 646
Enterprise Developer version of Visual Studio
creating, 647–651
.NET, 6
e-mail
Database Designer, 31
for customer ordering, 684–685, 693
Enterprise edition of SQL Server 2000, 922
sending and receiving, 730–742
Enterprise Manager, 931, 932
MailAttachment class, 732–733
enumerations
MailMessage class, 731–732
AnchorStyles, 301
POP3 mail server access, 733–742
ColumnHeaderStyle, 360
SmtpMail class, 731
DataRowState, 140–141
Edit Relation dialog box, 85–86, 86
DataRowVersion, 140
rules, 91–92
DataViewRowState, 119
editing DataSet object, 87–97
DialogResult, 318
Editor attribute, of custom control
DragDropEffects, 327
member, 555
GraphicsUnit, 383
editors, for Property Browser, 561–570
implementing for custom control property,
ELEMENTS modifier, for XML mode, 826
545–546

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
954 enumerator, for collections—finding rows by ID

ListViewAlignment, 360 ExecuteNonQuery method


MappingType, 133 of Command object, 62, 68
MenuMerge, 334 vs. ExecuteScalar, 267
ThreadPriority, 404 ExecuteReader method, of Command object, 62
ThreadState, 404 ExecuteScalar method
View, 360 of Command object, 62
XmlReadMode, 796 vs. ExecuteNonQuery, 267
XmlWriteMode, 792 ExecuteXmlReader method, of Command
enumerator, for collections, 510 object, 62
Equals method, overriding, 490, 491–492 ExpandableConverterObject class, 564
error handling, 477–479 ExpandableObjectConverter class, 573–574
by DataSet object, 92 methods to override, 565
when updating, 93–97 EXPLICIT mode, for SQL Server query
error messages results, 821
“Object reference not set to an instance ExploreAllRelations() subroutine, 114–115
of an object”, 464 ExploreDataSet() subroutine, 110–111
user-friendly, 93 Explorer style interface, 306
<error> tag in Web.config file, 638 ExploreRelations() subroutine, 112–114
Escape key, control detection and response to ExplorerStyle project, 365–370, 366
press, 576–577 ScanFolder() subroutine, 367
Eval method, of DataBinder class, 744
Evaluation edition of SQL Server 2000, 923
Event Viewer, 581, 581 F
EventArgs class, 476
class inheriting from, 500 FancyLabel project, 541–553, 542
EventLogTraceListener, 450 methods, 550
events testing, 553
creating handler at runtime, 313 fields, creating property with, 564–568
implementing, 475–477 File Field HTML control, 604
raising custom, 500–502 File menu, ➢ New, ➢ Project, 8, 8
Everyone group, 855 Filename property, of MailAttachment class, 732
exception handling, structured, 16–21 files
for divide-by-zero error, 17–21 permissions, 855–856
and performance, 642 saving TreeView or ListView contents to,
Exceptions dialog box, 452 373–381
exceptions, raising in class, 477 FileSystemWatcher component, 584
Execute permissions, 857 Fill method, of DataAdapter object, 87
ExecuteCommand method, of ServiceController Find method, of Rows collection, 124
object, 593 finding rows by ID, 124–125

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
FindString method, of ListBox control—GetHostByAddress() method, of IPAddress class 955

FindString method, of ListBox control, 347 fragment caching, 602, 641


FindStringExact method, of ListBox control, example, 657–658
347, 354 setting up, 653
firewall, 848 FrameBorderSize property, of SystemInformation
FirstDayOfWeek property, of Calendar object, 309
control, 606 framesets, from Visual Studio, 665–666
FixedFrameBorderSize property, of System- Friend modifier, 502
Information object, 309 From property, of MailMessage class, 732
flat XML document, 132 FromPage property, of PrinterSettings
Flow Layout Panel HTML object, 389
control, 604 fully-qualified URLs, 902
focus, modeless vs. modal forms, 314 functions
folders, mapping to TreeView control, for connection, 77
365–370, 366 SQL Editor for creating, 33, 33
fonts for menus, 323, 326
For Each...Next loop, to iterate through XML
nodes, 811 G
FOR XML clause in SQL Server query, 821
ELEMENTS modifier, 825–826 Gallaghers application. See e-commerce
Form Designer, for web applications, 237 application with ASP.NET
Form mobile control, 887 garbage collection, 13, 25
Formatter object, Serialize method, 374 Generate Dataset dialog box, 84, 85
forms. See also Windows Form Designer GET method, for uploading data, 707
BindingContext property of, 173, Get segment for Property procedure, 470
182–183 GetBytes method, of
data-bound design, 194–195 System.Text.Encoding.ASCII class,
vs. dialog boxes, 317 705–706
exchanging data between, 316 GetChanges method, of DataSet object, 800
hidden controls for storing information, 334 GetChildRows method, 113, 114
IsMDIContainer property, 332 GetElementsByTagName method, of XmlData-
modeless vs. modal, 314 Document object, 810
for web applications GetEnumerator method
WebForm1, 249–258, 250 of IEnumerator interface, 514
WebForm1 code, 254–258 of Items collection, 349
WebForm1 Code Behind, 264–268 GetErrors method, of DataTable object, 95, 150,
WebForm2, 258, 258–264, 262 189–190
WebForm2 code, 262–264 GetHashCode method, overriding, 490
WebForm2 Code Behind, 268–269 GetHostByAddress() method, of IPAddress
forms-based authentication, 860–861 class, 702–703

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
956 GetHostByName() method, of IPAddress class—HTML page

GetHostByName() method, of IPAddress HasErrors property


class, 703 of DataRow object, 109
GetLastError method, 220 of DataTable object, 95, 150
GetParentRows method, 113 <head> tag, style sheet reference in, 663
GetRequestStream object, 709 Headers property, of MailMessage
GetResponse method, of WebRequest class, 709 class, 732
GetResponseStream method, of WebRequest HeaderStyle property, of ListView control, 360
class, 709 Height property, of Size object, 307
GetStream method, of TcpClient class, 716 help, 10
GetString method, of hidden controls, for storing information, 334,
System.Text.Encoding.ASCII class, 706 696–697
GetType method, 466 Hidden HTML control, 604
overriding, 491 hierarchical XML file, creating, 794–795
GetUpperBound method, 343 HighContrast property, of SystemInformation
global variables, 24 object, 309
Global.asax file, 639, 693 Horizontal Rule HTML control, 604, 630
Google, 835 HorizontalScrollBarArrowWidth property,
GoSub keyword, 15 of SystemInformation object, 309
GoTo keyword, 15 HorizontalScrollBarHeight property,
Graphics object, 381 of SystemInformation object, 309
Clip property, 394 HorizontalScrollBarThumbWidth property,
printed page surface as, 557 of SystemInformation object, 309
Graphics property, of printer, 382 host computer, services available on, 9
GraphicsUnit enumeration, 383 hostname
Grid Layout Panel HTML control, 604, 653 for computers on Internet, 701
GridColumStyles collection, 805 discovering from IP address, 702–703
groups, restricting rights, 70 HostName property, of IPHostEntry class, 702
GUID (globally unique identifier), for order .htm file extension, 841
ID, 159 HTML controls, 604–606, 628–635
to build HTML page, 629–632, 631
converting to server-side control, 605–606,
H 634–635
vs. Web Forms controls, 238
hard drives .html file extension, 841
SQL Server 2000 requirements, 925, 935 HTML page
for Visual Studio, 7 copying and pasting code from external
hardware source, 660
.NET Framework requirements, 6–7 editing existing with Visual Studio, 632–634,
SQL Server 2000 requirements, 924–926 633, 634

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
HTML view—initial catalog attribute, of ConnectionString property 957

importing into project, 633–634 IIS Manager, authentication enforcement, 849


from Visual Studio, 664–665 IIS Virtual Directory Management fir SQLXML
HTML view, 10 console, 49, 51
for web applications, 237, 238 Ilasm.exe (MSIL Assembler), 13
HTML, vs. XML, 787 Ildasm.exe (MSIL Disassembler), 13
HttpWebRequest class, 709 Image HTML control, 604, 631, 653
HttpWebResponse class, 709 Image mobile control, 887
HyperLink Web control, 603, 608–609 Image Web control, 603
ImageButton Web control, 603
ImageFileName control, 334
I images
application to download, 713, 713–715
IAsyncResult object, 710 processing by thread, 422–428
IComparable interface, 503, 509–513 for rotating ads, 651–652
IComparer interface, 370, 509–513 WBMP, 883
implementing, 511 impersonation, 862–863
IconSize property, of SystemInformation implementation inheritance, 492
object, 309 Implements keyword, 25
IDE for Visual Studio .NET, 4–11, 8 Import method, of DataTable object, 120
identity fields importing HTML page into project,
refreshing in DataSet, 80 633–634
setting properties, 159 Imports statement, for namespace, 553
updating rows with, 152–160 IN keyword (SQL), 122
using transactions, 166–168 in-memory cookie, 695
IdentityTransaction project, 166–168 index value, for DataReader fields, 72
IDisposable interface, 26 IndexOf method, 343
IEnumerable interface, 513–515 information, hidden controls for storing, 334,
IEnumerator interface, implementing, 514–515 696–697
IEnumerator object, 349–350 inheritance, 492–501
methods, 354 of existing class, 494–501
#If...Then...#Else directives, 455 of existing control by custom control,
Iff() function, 122 555–561
IIS Configuration tool for SQLXML3, 934, 935 modifiers, 501–503
IIS (Internet Information Server) in Visual Basic, 21
authentication, 858–860 when to use, 508–509
default file extension, 841 inherited control, 533
patches, 848 Inherits keyword, 24, 485, 494, 503
Secure Sockets Layer (SSL), setup, 864–867 initial catalog attribute, of ConnectionString
Website properties, 856–857, 857 property, 66
for XML Web service, 287

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
958 initializing objects, with constructors—IsValid property, of PrinterSettings object

initializing objects, with constructors, 467–469 Internet Explorer


InnerText property, of ChildNodes collection, 811 cached credentials and testing
InnerXml property, of ChildNodes collection, 811 application, 909
Insert method to check for XML Web service, 52
of Columns collection, 362 Work Offline setting, 892
of SubItems collection, 364 Internet Information Server (IIS)
INSERT statement authentication, 858–860
ExecuteNonQuery method, vs. Execute- default file extension, 841
Scalar, 267 patches, 848
preventing generation, 80 Secure Sockets Layer (SSL) setup, 864–867
in transaction, 166 Website properties, 856–857, 857
InsertCommand object, 74 for XML Web service, 287
of DataAdapter object building in code, 101 Internet service provider (ISP), IP address
InsertCommand property, of DataAdapter assignment by, 700
object, 81–82 Invalidate method, to redraw custom control,
InstalledPrinters collection, 384 547–548
InstalledPrinters property, of PrinterSettings invoices, as transactions, 159
object, 388 Invoke method, 417
installing SQL Server 2000, 935–938 to call methods within thread, 517
InstallUtil.exe application, 585 InvokeRequired method, 417
instance methods, 479 IP addresses, 700–703
instantiating class, 465 for chat application, 718
instrumenting an application, 439 discovering from hostnames, 702–703
Integer Collection Editor, 563 IPAddress class, 702–703
Integer data type, 15, 467 IPConfig utility, 700–701, 701
integrated development environment (IDE) for IPHostEntry class, 702
Visual Studio .NET, 4–11, 8 IS NULL clause, for SQL comparisons, 99
integrated Windows authentication, 850, 859–860 Is operator, 466
interface inheritance, 492 IsAlive property, of thread, 405
interfaces, 503–515 IsBackground property, of thread, 405
for control, 532 IsDefaultPrinter property, of PrinterSettings
IComparable and IComparer interfaces, object, 389
509–513 IsMDIContainer property, 332
IEnumerable, 513–515 IsNull() function, 122
update within thread, 417–428 ISP (Internet service provider), IP address
ThreadedImageProcessing project, assignment by, 700
422–428, 423 IsPlotter property, of PrinterSettings object, 389
ThreadExplorer project, 418–422, 419 IsPostBack method, 763, 764
in Visual Basic, 25 IsValid property, of PrinterSettings object, 389

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
Item property—ListBox Web control 959

Item property LandscapeAngle property, of PrinterSettings


of DataReader object, 72 object, 389
of DataRow object, 109 last-write-wins scenario, 99, 150
of DataStream object, 71 implementing, 151
ItemArray property, of DataRow object, 109 _lastError private variable, 220, 223, 226
ItemCommand event, 765 LastIndexOf method, 343
Items collection for ListBox control, 347 LayoutMdi method, 339
members of, 348 Len() function, 122, 468
Items collection, of ListView control, 363–365 Length method, of String class, 467
Items property licensing SQL Server 2000, 924
of ListBox control, 346–347 LIKE operator, in Select method, 121
of ListView control, 305 Lines property, of TextBox control, 343
iterating Link mobile control, 887
through BookStore class, 515 <LINK> tag, for style sheet, 663
through XML node collection, 811 LinkButton Web control, 603
IUSR_machinename account, 859 LIST command (POP3), 734, 735
list controls, 745–754
CheckBoxList to database, 748–754, 750
J display issues, 252
DropDownList to array, 747
JDBC, SQL Server 2000 driver for, 30 ListBox to XML document, 745–746, 746
Join method, of thread, 406 List mobile control, 887
just-in-time (JIT) compiler, 11 ListBox control, 346–356
performance, 12 adding items, 346–347
changes, 342, 346
K DataSource property, 353
DrawMode property, 326
populating based on data entry, 575–576
Kerberos authentication, 859–860
search feature, 347
keystrokes, capturing, 421
SelectionMode property, 350–351
KeyUp event, 421
for storing objects, 348–356
ListBoxDemo project, 351–356, 352
L reading objects in, 349
selecting items, 350–351
Label controls, data binding, 260 update within thread, 436
Label HTML control, 604, 630, 653, 654 ListBox HTML control, 604
Label mobile control, 887, 894 ListBox Web control, 603
Label Web control, 603 data binding to XML document,
Landscape property, of PageSettings object, 388 745–746, 746

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
960 ListBoxDemo project—members of class

ListBoxDemo project, 351–356, 352 MailMessage class, 731–732


ListCount property, 347 MailMessage object, 598
listeners, for Trace and Debug statement main thread, 402
output, 450 interface changes, 417
ListView control, 200, 209, 359–365 notification of subthread completion,
with custom Print method, 556, 556 414, 417
displaying categories on, 211 MainMenu control, 319
Items and Subitems collections, 363–365 MakeXMLFile project, 803–806, 804
Items property, 305 managed code, 12
ListViewItemSorter property, 371 managed execution process, 11
persisting nodes, 373–381 manifest, 11
serializing, 374–375 mapping folders, to TreeView control,
sorting, 370–373 365–370, 366
Sorting property, 371 MappingType enumeration, 133
ListViewAlignment enumeration, 360 margins, for printing, 394
ListViewItem Collection editor, 361, 361 Margins property, of PageSettings object,
ListViewItemSorter property, of ListView 388, 390
control, 371 master/detail form, DataGrid Web control for,
Literal Web control, 603 772–774, 774
Load method Matrix project, 522–528
of BookStore class, 489 MaximumCopies property, of PrinterSettings
of XMLDataDocument object, 830 object, 389
LoadXML project, 796–798, 797 MaximumPage property, of PrinterSettings
local area network, IP address on, 701 object, 389
local variables, for class, 469 MaximumSize property, of form, 311
LocalEndPoint property, of TcpListener class, 717 MaxLength property
Localizable attribute, of custom control of DataColumn object, 126
member, 555 of TextBox control, 342–343
Locals window for debugging, 451 MaxWindowTrackSize property, of System-
locking rows in database Information object, 309
in pessimistic concurrency, 100 MDI applications, 331, 331–339
during transaction processing, 163–164 active child form access, 337, 337–338
logged messages, for Windows services, 581 menus, 332
Window menu, 339
MDIList property, of Window menu, 339
M MDIParent property, of child form, 334
MeasureString method, 394, 396, 549
machine.config file, 636 members of class, 469
MailAttachment class, 732–733 adding attribute to, 553

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
memory—Mobile Web Form 961

overriding default, 490–492 Microsoft .NET Framework Configuration


signature of overridden, 497 snap-in, 14, 14
memory middle tier
class code loading into, 465 of application, 215, 216
security settings for applications, 857 for Products project, 218–227
SQL Server 2000 requirements, 925 MinimumPage property, of PrinterSettings
for Visual Studio, 7 object, 389
memory leaks, 13 MinimumSize property, of form, 307, 311
Memory window for debugging, 451 MinimumWindowSize property, of System-
MenuFont property, of SystemInformation Information object, 309
object, 309 mobile applications
MenuHeight property, of SystemInformation cached credentials and testing, 909
object, 309 obtaining tools for creating, 882–884
MenuItem objects, 320 mobile devices, soft keys on, 906
MenuItems collection, 320 Mobile Internet Toolkit (MIT), 636,
adding to, 321 880–882
MenuMerge enumeration, 334 application to access database, 902–918
menus, 319–326 login page, 903–909, 906
for child forms in MDI application, 332–333 MobileWebForm1, 909–918
owner-drawn, 323–326, 324 planning, 903
Merge method, of DataSet object, 120 rationale, 903
Merge Module, 459 building simple application, 887–891
merge replication, 930 Code Behind view, 892
MergeableProperty attribute, of custom control contents, 882
member, 555 controls, 886–887
MergeOrder property, for menus, 334, 335 deployment, 901–902
MergeType property, for menus, 334 getting started, 884–886
messages, sending from within Windows service, MobileTestProject1, 893–898, 895
597–598 DeviceSpecific mobile control,
Meta Data Services, 930–931 897–898, 898
methods, 469 Form2, 896
implementing, 473–474 pagination, 895
overriding in derived classes, 23 validation controls, 896–897
microbrowser, 880 MobileTestProject2, 898–901
Microsoft AdRotator mobile control, 899–901
Passport, 861 images, 899
security bulletins, 848 obtaining, 882
Microsoft Intermediate Language (MSIL), 11 Visual Studio running, 881
advantages and disadvantages, 12–13 Mobile Web Form, 880

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
962 modal form—names

modal form, 314 thread methods, 405–407


modeless form, 314 thread pooling, 432–436
modules, 11 ThreadPool project, 433–436, 434
Modules window for debugging, 451 thread properties, 404–405
monitor, for Visual Studio, 7 thread setup, 403
MouseButtons property, of SystemInformation ThreadDemo project, 410, 410–413
object, 309 Threaded MessageBox, 402–403
MouseButtonsSwapped property, of System- when to use, 401
Information object, 309 multitier architecture. See n-tier applications
MousePresent property, of SystemInformation MustInherit keyword, 21, 502
object, 309 MustOverride modifier, 502
MouseWheelPresent property, of System- MyBase keyword, 502
Information object, 309 MyConnection project, 903–918, 918
MoveNext method, of IEnumerator interface, login page, 903–909, 906
354, 514 MobileWebForm1, 909–918
MSDN Library, .NET Framework Developer’s planning, 903
Guide, 868 rationale, 903
MSIL Assembler (Ilasm.exe), 13
MSIL Disassembler (Ildasm.exe), 13
MSIL (Microsoft Intermediate Language), 11 N
advantages and disadvantages, 12–13
multiple document interface, 306 n-tier applications, 274–278, 275, 277
multiple form applications, 314–319 advantages, 216–217
multithreading, 400 building, 281–294
actions to avoid in thread code, 402 C++ component, 282–284
for chat application, 719 presentation tier, 289–294
deadlock in, 431 structure, 281
interface update within thread, 417–428 VB component, 284–286
ThreadedImageProcessing project, XML Web service, 287–289
422–428, 423 example of distributed approach, 279–280
ThreadExplorer project, 418–422, 419 need for using, 278–279
passing data between threads, 413–417 XML Web service in, 276, 276
Revise ThreadDemo project, 414–417 Name property
responsive interfaces, 409–413 of ChildNodes collection, 811
SimpleThread project, 407, 407–409 of DataRelation objects, 111
synchronization, 428–432 of thread, 404
SyncLock block, 430–432 names
ThreadedCalcs project, 428–430 for components, 294
thread creaton and starting, 401–407 for controls, changing during design phase, 543

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
namespace—objects 963

for mobile projects, 893 Settings tab, 47, 47


for XML tags, 789 Virtual Names tab, 47, 48
namespace, 12 NewRow method, of DataTable object, 117
nested relationships nodes, in XML document, 788
query to return tables with, 828 Nodes property, of TreeView control, 305, 357
in XML file, 794–795 Nokia, 883
nested XML document, 132 None setting for DataSet rules, 92
creating, 133–134 NonInheritable keyword, 21, 496
.NET applications Notepad
COM components in, 277 to create XML data file, 621
managed execution process for, 12 for XML editing, 137
printing in, 557–561 Nothing keyword, 465, 466
.NET Compact Framework, 880 assignment to object variables, 26
.NET Framework, 4, 11–14 NotInheritable modifier, 501
application security, 13–14 NotOverridable keyword, 23, 502
compiling and executing in, 11–13 NTFS permissions, 855, 856
garbage collection, 13 null value
MSIL (Microsoft Intermediate Language), 11 handling in query, 222
advantages and disadvantages, 12–13 vs. zero-length string, 92
System.Xml class, 142
.NET Framework Configuration snap-in, 14, 14
.NET Framework Developer’s Guide, 868 O
Network property, of SystemInformation
object, 309 object-oriented programming
NetworkStream object, for GetStream abstraction, 480–481
method, 716 encapsulation, 481–484
New Breakpoint dialog box, 441, 441, 444 Visual Basic features, 21–26
New() function, 474 constructors and destructors, 25–26
New Project dialog box delegates, 25
for C++ component, 282 inheritance, 21
Console Application option, 454 interfaces, 25
Debug and Release configurations, 439–441 overloading, 22–23
for mobile web application, 884, 885 overriding, 23–24
for Visual Basic component, 284–286, 285 shared members, 24–25
for web applications, 237 “Object reference not set to an instance of an
for Windows services, 582 object” error message, 464
New Virtual Directory Properties dialog box, ObjectList mobile control, 887
46, 823, 824 objects, 12, 469
General tab, 46 basic data types as, 467–468

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
964 OLAP (Online Analytical Processing)—Parameters property, of Command object

vs. classes, 464 Options dialog box, Text Editor node, 442
garbage collection and, 13 original version of row in DataSet, 138, 140
initializing with constructors, 467–469 OuterXML property, of XMLDataDocument
sorting, 511. See also Sort method object, 830
vs. structures, 473 Outlook, 731
what it is, 466 output caching, 640–641, 689
OLAP (Online Analytical Processing), 927 Output window for debugging, 451
OLE DB-compliant databases, data provider overloading, 22–23
for, 61 methods, 473–474
OledbConnection object, creating, 66 Overridable keyword, 23, 502
On Error Goto statement, 17 Overrides keyword, 24, 503
OnContinue method, for Windows overriding, 23–24
services, 582 default class members, 490–492
OnCustomCommand event, for Windows owner-drawn menus, 323–326, 324
services, 589–590 OwnerDraw property, of menu item, 323
Online Analytical Processing (OLAP), 927
OnlineImages project, 713, 713–715
OnPaint event handler, overriding for custom P
control, 548–549
OnPause method, for Windows services, 582 <P> tag (HTML), 758
OnStart method, for Windows services, 582, pages, for SQL Server data storage, 926
584–585 PageSettings property, 385
OnStop method, for Windows services, 582, 585 PageSetupDialog control, 557
Opacity property, of form, 307 PageSize property, of DefaultSettings object,
Open method, for connection, 66 390, 393
OpenRead method, of WebClient class, pagination
703–704, 706 for DataSet display, 771–772
Openwave Generic Simulator, 881 for mobile web application, 895, 913
Openwave SDK, 883 Panel mobile control, 887, 893
OpenWrite method, of WebClient class, 704 Panel Web control, 603, 609–612, 610, 612
operating system PaperSize property, of PageSettings object, 388
item sizing determined by, 308–310 PaperSizes property, of PrinterSettings
for Visual Studio, 7 object, 389
optimistic concurrency, 80, 97–103 PaperSource property, of PageSettings
DataAdapter handling of, 150 object, 388
and row versions, 138 PaperSources property, of PrinterSettings
turning off, 99 object, 389
Option Explicit, 15, 16 Parameter objects, for stored procedures, 68
Option Strict, 15, 16 Parameters property, of Command object, 62

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
ParentNode property, of XmlNode object—printing 965

ParentNode property, of XmlNode object, POP3Client project, 736–742


817, 819 POP3Message class, 737–740
ParentTable property, of DataRelation populating control, ListView vs. DataGrid, 209
objects, 111 Portable Executable (PE), 11
parsing XML document, 788, 809–820 Position property, of BindingManagerBase
PASS command (POP3), 734, 735 class, 173
Passport, 861 PositionChanged event, of BindingManagerBase
password attribute, of ConnectionString class, 174, 180
property, 66 POST method, for uploading data, 707
Password Field HTML control, 605 Post Office Protocol (POP3), 731
passwords preemptive multithreading, 400
security for, 861 presentation tier
for shared drives, 702 of application, 214
Path environment variable, for service, 586 for n-tier applications, 289–294
PE (Portable Executable), 11 primary key
performance finding rows by, 124–125
locks in code and, 432 for relationship, DataSet handling of
optimizing for web applications, 642–643 changes to, 86
table name lookups and, 129 updating changes, 151–152
transactions and, 163 PrimaryKey property, of DataTable object, 127
persistent cookies, 695, 874 Print Spooler service, 581
persisting DataSet to file, 131–134 PrintDocument object, 381, 556
PersistListView project, 374–375 DefaultPageSettings property, 385
PersistTreeView project, 375–381, 376 PrintPage event handler, 557–561
Personal edition of SQL Server 2000, 922–923 PrinterName property, of PrinterSettings
pessimistic concurrency, 99–101 object, 389
PhoneCall mobile control, 887 PrinterResolution property, of PageSettings
PictureBox control, 423, 545, 546 object, 388
PlaceHolder Web control, 603, 612–616 PrinterResolutions property, of PrinterSettings
platform-independent components, deveopment object, 389
problems, 275–276 PrinterSettings property, of PageSettings
Plug and Play service, 581 object, 388
pool printing, 381–397
of connections, for ADO.NET, 59 DataSet contents, 120–121
of threads, 432–436 objects for, 381–387
ThreadPool project, 433–436, 434 Graphics object, 381
POP3 (Post Office Protocol), 731 PageSetupDialog control, 384–386, 385
POP3 mail server access, 733–742 PrintDialog control, 383–384, 384
POP3 commands, 733–735 PrintDocument object, 381, 382–383

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
966 PrintListView control—projects

PrintPreview control, 387 coding, 195–197


PrintPreviewDialog control, 386, 386–387 committing changes to database, 197–199
page geometry for, 390–391 data-bound form design, 194–195
PageSettings object, properties, 388 product selection by name, 193–194
PrinterSettings object Professional version of Visual Studio .NET, 6
InstalledPrinters collection, 384 programming languages
properties, 388–389 interoperability, 13
project, 391, 391–397 purchasing, 6
PrintListView control, 556, 556 Project menu
PrintPage event handler, 382 ➢ Add Existing Item, 633–634
PrintPreview control, 557 ➢ Add HTML Page, 664
PrintRange property, of PrinterSettings ➢ Add New Component, 285
object, 389 ➢ Add New Item, 10, 662–666
PrintToFile property, of PrinterSettings Crystal Report template, 776
object, 389 Style Sheet template, 663
Priority property text files, 666–667
of MailMessage class, 732 XML File template, 621, 647
of thread, 404 XSLT File template, 649
Private modifier, 502 ➢ Add Reference, 471
Processes dialog box, 445, 452 ➢ Add Web Form, 659
for debugging multiple processes, 446, ➢ Add Web Reference, 837, 842
446–447 ➢ Add Web User Control, 653
Show System Processes option, 596, 596 projects
Processor license, for SQL Server 2000, 924 ADOTests project, 65
Products NonBound project, 217, 217–233 commands and stored procedures, 67–69
methods to retrieve rows, 220–223 connections, 66–67
GetProductByID method, 222–223 Data Adapter to populate DataSet, 73–75
GetProductsByName method, 220–221 data retrieval with DataReader, 71–73
methods to update data source, 223–227 Show Row Versions, 146–149
AddProduct method, 224–226 ShowCurrentValues() subroutine, 148
DeleteProduct method, 226–227 ShowOriginalValues() subroutine,
UpdateProduct method, 223–224 147–148
middle tier, 218–227 ADOTransactions project, 161–165
presentation tier, 227–233 Anchor project, 301–302, 302
canceling operation, 231 Customers project, 177–191, 178
data editing buttons, 230–231 Data menu, 184, 186
edit or add operation, 232–233 deleted rows, 187
ShowProduct() subroutine, 229–230 editing current row, 182–184
Products project, 192, 192–199 navigating rows, 181–182

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
properties—Properties dialog box 967

updating data source, 184–191 data-bound form design, 194–195


View Changes menu, 185, 188–190 product selection by name, 193–194
DataAdapters project, 88, 88–90, 89 properties of, accessing, 15
DataEntry project, 535–541 Revise ThreadDemo project, 414–417
Delegates project, 517–522 SecurityDemo1 project, 868–878
DragDrop project, 329, 329–331 login page, 871–876, 877
ExplorerStyle project, 365–370, 366 URL authorization, 878
ScanFolder() subroutine, 367 web.config files, 876
FancyLabel project, 541–553, 542 WebForm1, 869–871
IdentityTransaction project, 166–168 XML-based user details file, 868
IdentityUpdates project, 153–160, 154 SQLServerXML project, 829, 829–830
adding new order, 155–156 TCPChat project, 717–723, 718
showing new order, 157–158 ThreadedCalcs project, 428–430
submitting new orders to data source, 158 ThreadedImageProcessing project,
importing HTML page into, 633–634 422–428, 423
ListBoxDemo project, 351–356, 352 ThreadExplorer project, 418–422, 419
LoadXML project, 796–798, 797 ThreadPool project, 433–436, 434
MakeXMLFile project, 803–806, 804 UDPDemo projects, 725, 725–730
Matrix project, 522–528 ViewCustomerOrders project, 200, 202–209
MobileTestProject1, DeviceSpecific mobile ViewProducts project, 200, 209–214
control, 897–898, 898 WebDataDemo2 project, 755–761, 756,
MobileTestProject2, 898–901 762, 764
AdRotator mobile control, 899–901 Code Behind, 763–768
images, 899 WebDataDemo3 project, 770, 771
MultipleForms application, 314–316, 315 WebDataDemo4 project, 774–775, 776
MyConnection project, 903–918, 918 WebDataDemo5 project, 777–779,
login page, 903–909, 906 782, 783
MobileWebForm1, 909–918 WebRequest project, 710–713
planning, 903 WebSessions project, 694–695
rationale, 903 XMLData project, 791, 791–795
OnlineImages project, 713, 713–715 properties, 469
PersistListView project, 374–375 exposing for custom control, 540–541
PersistTreeView project, 375–381, 376 implementing, 470–477
POP3Client project, 736–742 implementing as array, 562, 562–563
POP3Message class, 737–740 overriding in derived classes, 23
Printing project, 391, 391–397 read-only, 472
Products project, 192, 192–199 shared, 480
coding, 195–197 Properties dialog box
committing changes to database, 197–199 Anchor property, 301, 301

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
968 Properties dialog box for computer—Registers window for debugging

Constraints tab, 164


of service, 587–588, 588
R
Properties dialog box for computer, Network
Radio Button HTML control, 605
Identification tab, 701
RadioButton Web control, 603
Properties window in IDE, 9
RadioButtonList Web control, 603
Property Browser
vs. CheckBoxList Web control, 668
Configure Data Adapter hyperlink, 78
RAID (Redundant Array of Independent Disks),
for custom control, 541
for SQL Server 2000, 925
custom type editors for, 561–570
RaiseEvent statement, 475
array properties, 562–563
RAM (random access memory), SQL
type converters, 563–570
Server 2000 requirements, 925
DataBindings section, 172–173
random numbers, 467
type editors for, 561–570
RangeValidator mobile control, 887
proposed row version in DataSet, 139–140
RangeValidator Web control, 603, 625
Protected Friend modifier, 502
RAW mode, for SQL Server query results, 821
Protected modifier, 502
Read method
proxy server, 701
of DataReader object, 72
Public access modifier, 470, 502
of DataStream object, 71
public key encryption, 14
read-only properties, 472
ReadOnly attribute, of custom control
Q member, 555
ReadOnly property, of TextBox control, 343
queries ReadXml method, of DataSet object, 136–137,
action, 69 145, 795–796
Command object to execute, 67–69 receiving mail. See sending and receiving mail
vs. DataSet object, 201–202 record in database
vs. stored procedures, 69–70 adding, 751
templates for, 823, 826–830 deleting, 752–753
virtual folder for, 822, 822–826 updating, 753–754
XML format for results, 820–821 RecordSet, vs. DataSet objects, 61
Query Analyzer, 932, 933 redirection, for mobile clients, 901–902
Query and View Designer, 33, 34 ReferenceEquals method, overriding, 491
accessing, 39 referential integrity
Query Builder dialog box, 42, 42, 80, 286, 286, DataSet acceptance of row and, 92
755, 756 DataSet enforcement of, 85
for mobile web application, 904, 904 and order of populating DataTables, 87
QueueUserWorkItem method, of ThreadPool RefreshProperties attribute, of custom control
object, 433 member, 555
QUIT command (POP3), 734 Registers window for debugging, 452

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
registration of Crystal Reports—rows in DataSet 969

registration of Crystal Reports, 777 response file, for compiler options, 454
RegularExpressionValidator mobile control, 887 Resume method, of thread, 407
RegularExpressionValidator Web control, 603, ResumeBinding method, of BindingManager-
625, 628 Base class, 174
disabling during testing, 672 RESX files, 786
RejectChanges method RETR command (POP3), 734, 735
of DataRow object, 109 return value of method, 473
and row versions, 138 reversing default sort order, 119
Relation object, 85 Revise ThreadDemo project, 414–417
relationships, 111–115 right-click menu, creating, 320
in database, for web applications, 247, 248 rights of users
in DataSet restricting, 70
code to set, 102–103 and update problems, 152
creating, 84–87 root element in XML, 788
DataRelation objects, 65, 106 row versions in DataSet
ExploreAllRelations() subroutine, 114–115 current, 138
ExploreRelations() subroutine, 112–114 default, 139–140
and XML, 793–794 original, 138
nested, in XML file, 794–795 proposed, 139–140
relative addresses, and mobile applications, 902 viewing, 146–149
Release version of application, 439–441 RowChanged event, of DataTable object, 176
compiling, 691 RowChanging event, of DataTable object, 175
Remove method RowDeleted event, of DataTable object, 176
of DataRow object, 116 RowDeleting event, of DataTable object, 176
of Items collection, 347 RowError property, of DataGrid control, 97
of SubItems collection, 364 RowFilter property, of DataView object, 122
RemoveAt method Rows collection
of BindingManagerBase class, 174 of DataTable object, 109–111
of SubItems collection, 364 Find method of, 124
RemoveItem method, 347 rows in database. See also DataRow objects
Repeater Web control, 603, 744, 774–775 editing and deleting, 97–98
Replication, for SQL Server 2000, 930 finding by ID, 124–125
RequiredFieldValidator mobile control, locking in pessimistic concurrency, 100
887, 896 updating those with identity columns,
RequiredFieldValidator Web control, 603, 625 152–160
Reset Button HTML control, 605 using transactions, 166–168
Reset method, of IEnumerator object, 354, 514 rows in DataSet
resizing forms. See sizing forms adding, 116–117
Resolve() method, of IPAddress class, 703 deleting, 116

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
970 rows in DataTable object—serializable object

rows in DataTable object for XML Web service, 847–852


editing current, 182–184 authentication, 849–851
navigating, 181–182 encryption, 852
RowState property Web server protection, 848–849
of DataRow object, 140–145 Security.Cryptography class, 482
of DataView object, 122 SecurityDemo1 project, 868–878
Running Documents window for debugging, 451 Select a Frameset Template dialog box, 665
runtime, event handler creation at, 313 Select method
of DataTable object, 118–122
filter argument, 121
S of TextBox control, 344
SELECT statement
Save method, for BookStore class, 489 building for stored procedure, 33
Save Warning dialog box, 37 controlling generation, 151
scalability, 215, 216 support for FOR XML clause, 822
n-tier applications for, 279 SelectAll method, of TextBox control, 344
Schema Designer, 86, 135–136 SelectCommand object, 74
schemas in XML, 130, 787 of DataAdapter object building in code, 101
creating, 134–137, 801–806, 802 SelectedIndexChanged event, 765
MakeXMLFile project, 803–806, 804 SelectedItem property, of ListBox control, 350
scrolling forms, 310–311 SelectedItems property, of ListBox control, 350
Secure Sockets Layer (SSL), 852, 860 SelectionLength property, of TextBox
setup in IIS, 864–867 control, 343
security, 854–861 SelectionList mobile control, 887
for applications, 13–14 SelectionMode property, of ListBox control,
directory and file permissions, 855–856 347, 350
forms-based authentication, 860–861, SelectionStart property, of TextBox control, 343
867–868 SelectionText property, of TextBox control, 343
login page, 871–876, 877 SelLength property, of TextBox control, 343
web.config files, 876 SelStart property, of TextBox control, 343
WebForm1 setup, 869–871 SelText property, of TextBox control, 343
XML-based user details file, 868 semitransparent forms, 307
IIS authentication, 858–860 Send method, of UdpClient class, 724
IIS Website properties, 856–857, 857 sending and receiving mail, 730–742
impersonation, 862–863 MailAttachment class, 732–733
Passport, 861 MailMessage class, 731–732
Secure Sockets Layer (SSL), 860 POP3 mail server access, 733–742
setup in IIS, 864–867 SmtpMail class, 731
URL authorization, 860, 863–864, 878 serializable object, 495

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
Serialization class—soft keys, on mobile devices 971

Serialization class, 489–490 Shadows keyword, 503


Serialize method, of Formatter object, 374 shared drives, password for, 702
Serializer class, 373–374 shared members, in Visual Basic, 24–25
serializing shared methods, 221, 479
ListView control, 374–375 and _lastError private variable, 223, 226
TreeView control, 375–381 shared properties, 480
server sharpening algorithm for image processing, 425
application to accept uploaded data, 707 Show method, to display form, 314
DataReader class to read data from, 69 ShowCurrentValues() subroutine, 148
Server Agent, 934 ShowDialog method, 314, 318
Server Explorer, 9, 31, 31 ShowOriginalValues() subroutine, 147–148
Data Connections node, 35 Simple Mail Transfer Protocol (SMTP), 731
for database creation, 245 to create message within VB .NET
server-side controls, 605 application, 598
converting HTML control to, 605–606, Simple Object Access Protocol (SOAP), 834,
634–635 835–836
Service Control Manager, 590, 595 SimpleThread project, 407, 407–409
Service Manager, 932, 933 single document interface, 305–306
service pack 2, for SQL Server 2000, 29 Size property, of form, 307–308
ServiceController object, 591 SizeGripStyle property, of form, 311
ExecuteCommand method of, 593 sizing forms
ServicedComponent, 277 and anchored controls, 302, 302
ServiceInstaller component, 585–586 controlling, 307–308
ServiceName property, 586 Splitter control for adjacent controls, 303
services. See also Windows services sizing handle of form, 311
session Sleep method, of thread, 406–407
management, 693–697 Small Computer System Interface drives,
need for, 642 for SQL Server 2000, 925
ViewState to store control values, 641 Smart Device Extensions, 880
session state, vs. application state, 693 smoothing algorithm for image processing, 425
session variable, array assigned to, 677 SMTP (Simple Mail Transfer Protocol), 731
SessionID, 693 SmtpMail class, 731
SessionState, and performance, 642 snapshot replication, 930
<sessionState> tag in Web.config file, 638 SOAP (Simple Object Access Protocol), 834,
Set segment for Property procedure, 470 835–836
SetDefault setting for DataSet rules, 92 SOAP Toolkit, 835
SetNull setting for DataSet rules, 92 SOAP Virtual Name Configuration dialog box,
Setup files, for distribution, 459 51, 52
Setup Wizard, 456–458, 457 soft keys, on mobile devices, 906

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
972 software—SQLXML Web service

software installing, 935–938


obtaining emulators, 882 licensing, 924
SQL Server 2000 requirements, 924–926 new features, 938–939
Solution Explorer, 9 overview, 28–29
Properties, 15 and performance, 642
in style sheet editor format, 663, 663–664 recommended updates, 29–30
Web reference in, 843 service pack 2, 29
for XML schemas, 801 SQL Server 2000 driver for JDBC, 30
Sort method, 469, 510 SQLXML 3 Service Pack 1, 30
Sort property, of DataView object, 122 Web Services Toolkit, 29–30
sorting system requirements, 924–926
ListView control, 370–373 Visual Studio .NET to work with, 30–45
rows in DataTable object, 118–119 application creation, 34–44, 45
Sorting property, of ListView control, 371 tools, 30–33
Splitter control, 303–306, 304 XML and, 820–830
properties, 305 SQLServerXML project, 829, 829–830
SQL Editor, 33, 33 templates for queries, 826–830
SQL injections, 69–70 virtual directory configuration, 822,
SQL Profiler, 934, 934 822–826
SQL Server 2000 XML features, 129
and comparisons with null value, 99 XML support to build XML Web service,
components, 926–931 45–55
analysis services, 927–928 building SQLXML Web service, 50–55, 55
Data Transformation Services, 928, query using URL, 49, 50
929, 930 virtual directories setup, 45–49
database engine, 926 SQL Server 2000 driver for JDBC, 30
English Query, 930 SQL statement, storing as view, 77
Meta Data Services, 930–931 SQLCommand object, creating, 67–68
Replication, 930 SQLConnection object, creating, 66
data provider for, 61 <sql:param> tag, 827
editions, 922–923 SqlParameter Collection Editor dialog box, 82
graphical tools, 931–934 <sql:query> tag, 826
Enterprise Manager, 931, 932 SQLServerXML project, 829, 829–830
IIS Configuration tool for SQLXML3, SQLXML 3 Service Pack 1, 30, 45
934, 935 SQLXML Web service, 50–55
Query Analyzer, 932, 933 client application for, 52–55
Server Agent, 934 creating, 51
Service Manager, 932, 933 stored procedure for, 50, 51
SQL Profiler, 934, 934 WebServices directory files, 52

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
SSL (Secure Sockets Layer)—System.Net class 973

SSL (Secure Sockets Layer), 852 for XML data, 649


Standard edition of SQL Server 2000, 922 Styles Editor dialog box, 894
Standard Report Expert for Crystal Reports StyleSheet mobile control, 887, 893
Data tab, 778 Sub Finalize statement, 25
Fields tab, 779 Sub New statement, 25
Start method Subitems collection, of ListView control,
of TcpListener class, 717 363–365
of thread, 403, 405 Subject property, of MailMessage class, 732
Start Page screen, 4, 5 Submit Button HTML control, 605
STAT command (POP3), 734, 735 SubString() function, 122
static discovery files, 836, 840–841 SupportsColor property, of PrinterSettings
static members, 24 object, 389
step mode, in debugging session, 443 Suspend method, of thread, 407
Stop method, of TcpListener class, 717 SuspendBinding method, of BindingManager-
stored procedures Base class, 174
Command object to call, 68–69 synchronization of threads, 428–432
for connection, 77 SyncLock block, 430–432
creating, 39 ThreadedCalcs project, 428–430
executing within code, 210 System.ComponentModel.Design namespace, 553
and performance, 642 SystemInformation object, 308–310
vs. queries, 69–70 System.Integer class, 467
SQL Editor for creating, 33, 33 System.Net class, 700
for SQLXML Web service, 50, 51 Dns class, 702–703
Stored Procedures dialog box, 51 sending and receiving mail, 730–742
stream, saving object to, 374 MailAttachment class, 732–733
String Collection Editor, 346–347 MailMessage class, 731–732
String data type, 467 POP3 mail server access, 733–742
StringBuilder class, 342 SmtpMail class, 731
strings TcpClient and TcpListener classes, 715–723
converting to arrays of bytes, 705 TCPChat project, 717–723
zero-length, vs. null value, 92 UdpClient class, 723–730
strong naming techniques, in .NET, 14 UDPDemo projects, 725, 725–730
strongly typed DataSet, 107 WebClient class, 703–708
structured exception handling, 16–21 to download documents, 706–707
and performance, 642 methods for downloading data, 703–704
structures, vs. objects, 473 methods for uploading data, 704–706
Style Builder dialog box, 629, 629–630 to upload documents, 707–708
style sheets WebRequest and WebResponse classes,
cascading, 663–664 708–714

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
974 System.Random class—TextChanged event, of TextBox control

OnlineImages project, 713, 713–715 TCPChat project, 717–723, 718


WebRequest project, 710–713, 711 TcpClient class, 715–723
System.Random class, 467 TcpListener class, 715–723
System.RunTime.Serialization.Formatters Telnet, 735, 736
namespace, 489 templates
System.ServiceProcess class, 590 for DataList control, 754–755
System.Text.Encoding.ASCII class, 705 excluding from project, 659
System.Text.Stringbuilder class, 469 for queries, 823, 826–830
System.Web.Mail class, 598, 731 virtual folder for, 822, 822–826
terminating threads, 405
testing
T connection to database, 76
custom controls, 539–541
Table Designer, 31, 32, 36, 36 project for, 543–544
for table relationship creation, 37, 38 data-bound controls, 577, 577–578
Table HTML control, 605, 631 FancyLabel project, 553
Table Web control, 603, 617–620 mobile applications, cached credentials
TableCell Collection Editor dialog box, 617, 618 and, 909
TableCell Web control, 603, 617 virtual folder for SQL Server, 824–825
TableName property, 120 Windows services, 589
TableRow Collection Editor dialog box, XML Web service, 288, 839
617, 617 Text Area HTML control, 605
TableRow Web control, 604, 617 Text Field HTML control, 605
tables for web page layout, 658–660, 662, 668 text files, from Visual Studio, 666–667
tables in database. See also DataTable objects TextBox control, 342–346
for connection, 77 binding to data source, 194
limiting download, 73 changes, 342
relationship between, 37, 38, 65 copying and pasting, 345–346
tables in DataSet data binding and, 179
adding, 84 drag operations for, 328–329
name or index access, 107 MaxLength property of, 342–343
TableStyles collection, of DataGrid control, 805 printing text on, 394–397
Tag property undoing edits, 344–345
of ListView items, 362, 365 update within thread, 436
serializing, 381 WordWrap property of, 343
of TreeView control node, 366 TextBox mobile control, 887
tags in XML, 134, 787–790 TextBox Web control, 604
attributes, 790 TextChanged event, of TextBox control,
names for, 789 344–345

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
TextView mobile control—UDDI (Universal Description, Discovery and Integration) 975

TextView mobile control, 887, 894 Transact-SQL (T-SQL), 926


TextWriterTraceListener, 450 Query and View Designer to create
This window, for debugging, 451 statements, 33, 34
Thread object, 401 transactional replication, 930
ThreadedCalcs project, 428–430 transactions, 160–168
ThreadedImageProcessing project, executing with DataAdapter, 165–168
422–428, 423 invoices as, 159
ThreadExplorer project, 418–422, 419 performance issues, 163
Threading namespace, 402 for pessimistic concurrency, 100
ThreadPool object, QueueUserWorkItem TransformSource property, of XML control,
method of, 433 620, 809
ThreadPool project, 433–436, 434 transparency of forms, 307
ThreadPriority enumeration, 404 TreeNode Editor, 357, 357
threads. See multithreading TreeView control, 357–359
Threads window for debugging, 451 adding nodes at runtime, 359
ThreadState enumeration, 404 changes, 342
ThreadState property, of thread, 404–405 Invoke method to call methods within
three-tier application, 274. See also n-tier thread, 418
applications mapping folder to, 365–370, 366
Throw method, 477 Nodes property, 305
To property, of MailMessage class, 732 persisting nodes, 373–381
Toolbox, 9, 9 serializing, 375–381
for web applications, 237 populating, 204–205
XML tools, 135 with recursive subroutine, 367–368
Element item, 135 trust, levels for assemblies, 14
Tools menu Try...Catch statement, 16–21, 684
➢ Debug Processes, 445 for divide-by-zero error, 17–21
➢ Options, 7, 442 type converters, 563–570
ToolWindowCaptionButtonSize property, type editors, for Property Browser, 561–570
of SystemInformation object, 309 TypeConverter attribute, of custom control
ToolWindowCaptionHeight property, member, 555
of SystemInformation object, 309 TypeConverter class, 567
TOP command (POP3), 734 TypeName() function, 466
ToPage property, of PrinterSettings object, 389
TopMost property, of form, 306–307
ToString method, overriding, 491, 492 U
Trace class, 439, 447–449
<trace> tag in Web.config file, 638, 639 UDDI (Universal Description, Discovery and
TraceListener class, 450 Integration), 836–837

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
976 UdpClient class—VB component

UdpClient class, 723–730 USER command (POP3), 734, 735


creating instance as listener, 724 User Datagram Protocol. See UdpClient class
UDPDemo projects, 725, 725–730 user-defined functions, creating, 39
Undo/Redo feature, 344–345 user-drawn control, 533, 541–553, 542
Universal Description, Discovery and user groups, restricting rights, 70
Integration (UDDI), 836–837 user id attribute, of ConnectionString
unmanaged code, 12 property, 66
Update method, of DataAdapter object, 74, user interaction with services, 592–595,
90–91, 149 597–598
UPDATE statement, 97–98 UserControl object, 534, 543, 544
preventing generation, 80 adding custom properties to, 547–548
in transaction, 166 UserDomainName property, of System-
with and without optimistic currency, 151 Information object, 309
UpdateCommand object, 74 UserName property, of SystemInformation
of DataAdapter object building in code, 101 object, 309
UpdateRowSource property, of DataSet
Command objects, 82
UpdateRule property, for DataSet, 86 V
updating
common errors, 97–103 validation controls
error handling when, 93–97 for mobile web application, 896–897
UploadData method, of WebClient class, 704 for Web Forms, 624–628, 627, 628
UploadFile method, of WebClient class, validation of data, 97
705, 707 in custom control, 536–537
uploading data ValidationSummary mobile control, 887
with GetRequestStream object, 709 ValidationSummary Web control,
methods for, 704–706 604, 625
uploading files, methods for, 707–708 variables
UploadValues method, of WebClient class, 705 _lastError private variable, 220, 223, 226
URL authorization, 860, 863–864 declaration, 15
URL, to query SQL Server, 49, 50 global, 24
UrlContentBase property, of MailMessage local, for class, 469
class, 732 Nothing keyword assigned to, 26
UrlContentLocation property, of MailMessage session, array assigned to, 677
class, 732 Variant data type, 15
user authentication VB component
vs. authorization, 854 for n-tier applications, 284–286
in Windows, 67 calling, 295
in XML Web service, 849–851 setting Text property to, 292

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
VerticalScrollBarArrowHeight property, of SystemInformation object—Web Forms controls 977

VerticalScrollBarArrowHeight property, framesets, 665–666


of SystemInformation object, 309 HTML pages, 664–665
VerticalScrollBarThumbHeight property, text files, 666–667
of SystemInformation object, 309 running MIT, 881
VerticalScrollBarWidth property, of System- with SQL Server 2000, 30–45
Information object, 309 application creation, 34–44, 45
View enumeration, 360 tools, 30–33
View property, of ListView control, 360 system requirements, 6–7
ViewCustomerOrders project, 200, 202–209 wizards, 75
viewing .vsdisco file extension, 836
DataSet object, 87–97
tables related to entered data, 199–214
ViewProducts project, 200, 209–214 W
GetProductUnits stored procedure, 210
HandleItemSelection() subroutine, 212–213 Watch window for debugging, 451
views, for connection, 77 WBMP images, 883
ViewState, 641 web applications
for control information, 696 ASPX pages, 236–239
and performance, 642, 654 Form Designer, 237
virtual directories for SQLXML, setup, 45–49 New Project dialog box for, 237
virtual folder, for query templates, 822, 822–826 optimizing performance, 642–643
virus scanner, 848 sample front end, 244–269
Visible property, of controls, 312 database creation, 245–249
Visual Studio .NET running, 269, 269–270
to create XML data file, 647–651 WebForm1, 249–258, 250
debugging session, 443 WebForm1 code, 254–258
for editing existing HTML page, 632–634, WebForm1 Code Behind, 264–268
633, 634 WebForm2, 258, 258–264, 262
editing HTML page in, 239 WebForm2 code, 262–264
editions, 6 WebForm2 Code Behind, 268–269
IDE (integrated development environment), web browser. See also Internet Explorer
4–11, 8 in Visual Studio IDE, 7
new features, 15–26 Web Forms
object-oriented programming, 21–26 enableSessionState property for, 694
structured exception handling, 16–21 to process XML data, 622, 623
New Project menu, ASP.NET Web Web Forms controls, 602–604, 606–628.
Application, 237 See also data-bound Web controls
page options, 662–666 Calendar control, 606, 606–608
cascading style sheets, 663–664 vs. HTML controls, 605

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
978 Web Server Certificate Wizard—Windows services

HyperLink control, 608–609 WHERE clause


Panel control, 609–612, 610, 612 to limit table download, 73
PlaceHolder control, 612–616 in updates, 98
Table control, 617–620 Width property, of Size object, 307
validation controls, 624–628, 627, 628 Window menu, creating, 339
XML control, 620–624 Windows application, IDE for, 9, 9–10
Web Server Certificate Wizard, 864, 865 Windows applications, interface styles, 305–306
Web server protection, for XML Web service, Windows CE edition of SQL Server 2000, 923
848–849 Windows control. See controls
Web services, 59 Windows Control Library project type, 534
Web Services Description Language Windows Form Designer, 300–312
(WSDL), 836 anchoring and docking, 300–303
Web Services Toolkit, 29–30 Controls collection, 312–313
Web Setup, 459 dialog boxes, 317–319
WebClient class, 703–708 drag and drop operations, 326–331
to download documents, 706–707 form size and position, 306–310
methods for downloading data, 703–704 Opacity property, 307
methods for uploading data, 704–706 Size property, 307–308
to upload documents, 707–708 SystemInformation object, 308–310
web.config files, 636–638, 637 TopMost property, 306–307
authentication settings, 854–855 MDI applications, 331, 331–339
disabling debug in, 691 active child form access, 337, 337–338
enabling impersonation, 862 Window menu, 339
security settings, 850 menus, 319–326
URL authorization, 860, 863–864 owner-drawn, 323–326, 324
WebDataDemo2 project, 755–761, 756, multiple form applications, 314–319
762, 764 scrolling forms, 310–311
Code Behind, 763–768 Splitter control, 303–306, 304
WebDataDemo3 project, 770, 771 Windows form, to view database data, 40
WebDataDemo4 project, 774–775, 776 Windows services
WebDataDemo5 project, 777–779, 782, 783 adding custom commands, 589–590
WebRequest class, 708–714 adding user interaction, 592–595
OnlineImages project, 713, 713–715 basics, 580–581
WebRequest project, 710–713, 711 controlling within another application,
WebRequest project, 710–713, 711 590–592
WebResponse class, 708–714 creating, 581–598
OnlineImages project, 713, 713–715 installing service, 585–589
WebRequest project, 710–713, 711 debugging, 595–597
WebSessions project, 694–695 sending messages from within, 597–598

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
Windows, user authentication—XML Web service 979

testing, 589 transforming XML files, 806–809, 808


viewing properties, 587–588, 588 XML control, 809
viewing those running, 580, 580 XML data file
Windows, user authentication, 67 code to load contents into CheckBoxList
WithEvents keyword, 476, 516 controls, 675
wizards, 534 creating, 621
WordWrap property, of TextBox control, 343 XML document
WorkingArea property, of SystemInformation data binding ListBox Web control to,
object, 309 745–746, 746
workstation id attribute, of ConnectionString nodes in, 788
property, 66 re-creating DataSet from, 145
WriteXml method of DataSet object, 131, transforming, 806–809, 808
136–137, 791–792 XML Notepad, 137
for XML file with nested tables, 794–795 XML schemas, 130, 787
WriteXmlSchema method, 137 creating, 134–137, 801–806, 802
WSDL (Web Services Description Language), 836 MakeXMLFile project, 803–806, 804
XML view, for schema, 86
XML Web control, 604, 620–624
X XML Web service
basics, 834–837
XML (eXtensible Markup Language) advantages and disadvantages, 834–835
and ADO.NET, 58, 59–60 client for, 842–846
and DataSet object, 129–137, 130 consuming, 840–846
controlling XML file structure, 132–134 discovery files creation, 840–842
persistence, 131–134 creating, 837–839
XML schemas, 134–137 setup, 838–839
vs. DataSets, 790–800 testing, 839
DiffGram of edited DataSet, 799–800 in n-tier applications, 276, 276, 287–289
loading XML into DataSets, 795–796 calling, 295
LoadXML project, 796–798, 797 security for, 847–852
XMLData project, 791, 791–795 authentication, 849–851
vs. HTML, 787 encryption, 852
parsing files, 788, 809–820 Web server protection, 848–849
SQL Server and, 820–830 setting Text property to, 292
SQLServerXML project, 829, 829–830 SQL Server 2000 for creating, 45–55
templates for queries, 826–830 building SQLXML Web service,
virtual directory configuration, 822, 50–55, 55
822–826 query using URL, 49, 50
tags, 134, 787–790 virtual directories setup, 45–49

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.
980 XML wrapper—zero-length string, vs. null value

XML wrapper, 277 XmlWriter class, 810


XMLDATA modifier, for XML mode, 826 XPath language, 816
XMLData project, 791, 791–795 XQuery, 60
XmlDataDocument object, 810 XSL (eXtensible Style Sheet) transformation, 806
and DataSet object, 129 <xsl:for-each> tag, 808
loading XML file into, 815 XSLT style sheet, 620
XmlDocument class, 810 creating, 621–622
XmlNode object, 811
ParentNode property of, 817, 819
XmlReader class, 810 Z
XmlReadMode enumeration, 796
XmlWriteMode enumeration, 792 zero-length string, vs. null value, 92

Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved.

You might also like