Index
Symbols & (interpreting special characters) 161 * (wildcard character) 770 ? (wildcard character) 771 .NET see alphabetized as NET .xyz file type
see alphabetized as individual file type /xyz parameter
see alphabetized as individual parameter <xyz>tag
see alphabetized as individual tags
A <a> tag
Htm!Anchor class 840 related control classes 167
Abandon() method, HttpSessionState 290, 293 absoluteExpiration parameter
Insert() method, Cache object 749 Accept property, HtrnllnputFile 84 7 AcceptChanges() method, DataSet 378 accessibility
<authorization> tag 916 DNS (Domain Name Service) 347 keywords in C# and VB.NET 76 scope changes from VB6 65
accessing files see file access AccessKey property, WebControll70, 857 Account class
Balance property 658 stateful design 657
AccountOperator role 789 accounts 762, 784
Anonymous authentication 786 ASP.NET code 762 ASP.NET security 761 ASPNET account 928 local system account 928 non-ASP.NET security 761 Windows authentication 784
AccountUtility class stateless design 658
Ad/Advertisement file/elements 239,240 adaptive controls 708, 709 AdBoard 663, 671 Ad Created event, AdRotator 241, 881 Add Counters window 735
Add() method DateTime class 60 rows collection 421 TimeSpan class 61 Tree View control269
<add> tag, configuration files 129 <httpHandlers> tag attributes 922 <http Modules> tag attributes 923
Add Customer() method, IBuySpy 808 adding controls, VS.NET 218 AddToCart.aspx page, IBuySpy 818 AddXyz() methods, DateTirne 60 Administrator role
default Windows roles 789 IBuySpy portal 831
ADO communication problems 369 Connection object 382 database access 370 features not in ADO.NET 385 moving to ADO.NET 383 update problems 373
ADO.NET365 see also databases .NET class library 373 accessing database 367, 727 ADO compared 383 characteristics 370 data access 387 data management 365 data namespaces 376 data providers 374 DataSet object 370 disconnected access 370 enhanced DataSet 373 names paces 397 object model373 updating database 370, 373 using DataSet with 380 XMLin563 XML integration 371
AdRotator class 239, 240, 879 Ad Created event 241 event handling 242 frame targets 241 KeywordFilter property 241 members 881 properties 240
AdvertisementFile property, AdRotator 881
935
Index
936
<Advertisements> element, XML AdRotator control879
Age property, Processlnfo 730 aggregate functions
SQL statements 392 using in database component 667
aliases creating virtual directories 26
Align property Htmllmage class 844 HtmlTable class 852
alignment, images 863, 864 <alloW> rule, <authorization> 773
machine.config file 916 web.config settings 787
AllowPaging property, DataGrid 494, 900 AllowSorting property, DataGrid 497, 900 Alt property, Htmllmage 844 <AltemateText> element
Advertisement File 240, 880 AltemateText property
Image class 863 ImageButton class 864
AltematingitemStyle property DataGrid class 903 DataList class 898
AlternatingitemTemplate property DataList class 898 Repeater class 894
anchor see HtmlAnchor class And keyword
bitwise arithmetic 507 Where clause 392
Announcements module, IBuySpy 829 AnnouncementsDB component, IBuySpy 832 anonymous access
authentication if enabled 787 disabling 785 programmatic impersonation 794
Anonymous mode 786 anonymous users
accessing specific directories 771 accessing specific files 773 allowing 762 ASP.NET security 761 authorization rules 770 forbidding 762 forms authentication, implementing 768 IUSR account 762, 784 multiple authorization rules 771 non-ASP.NET security 761 question mark wildcard 771 restricting 770, 771
AppendChild() method, XmlDocument 547 applets
single-page applet 133 web page applet 190
Application Center Test 733 application domain 107 application events 122 Application log 320 Application object 602 Application property, Page 156 Application Restarts counter 736 Application state 300
data caching compared 738 data types 303 lifetime 303 performance 301, 303 scope 303 security 303 state management options 303 storage location 303 tracing338
Application_Authenticate event, global.asax associating user with role 782
Application_OnXyz events 123 ApplicationException property 666 application-level tracing 343 ApplicationPath property, HttpRequest 158 applications see web applications appRequestQueueLimit attribute
<httpRuntime> tag 924 AppSettings property, Configuration
Settings 130 <appSettings> tag
configuration file structure 910 custom settings 128 retrievingXML file name 910
arcs, drawing 719 Array class 61, 62 Array data type 88 arrays
accessing an element 50 C# and VB. NET 49 data binding 432 lower bound 49 multidimensional arrays 50 ReDim keyword 50 redimensioning 50 web service data types 598
.ascxfiles ASP.NET applications 101 controls 679
I asmversion parameter 676
.asmxfiles ASP.NET applications 101 copying to web server 589 deploying web services 590 method indication 588 web services 587
ASP ASP.NET compared 6, 135 difficulties 135 language evolution 44 problems with ASP 9 replacing with ASP.NET pages 361 running with ASP. NET 360
.asp files creating a simple application 107 file types, ASP 102
asp tag prefix 681 ASP. NET
ASP compared 6, 135 brief description 10 evolution ofVB.NET 44 liS interaction 761, 762 installing 37, 38 intrinsic objects 602 IUSR account 762 migrating from ASP 360 running with ASP 360 server-side programming 6, 7
ASP.NET Security Model 760 ASP.NET test page 592 asp: prefixed tags 167 ASPNET account 40, 41, 928 .aspx control tag 858 .aspxfiles
ASP.NET applications 101 code examples 199 code-behind programming 110 creating a simple application 107 DataGrid control content 899 DataList control content 895 deploying VS.NET project 349 importing namespaces 118 OutputCache directive 739 repeated-value data binding 441
.aspx.vb files, VS.NET 217 assemblies 95
bin directory 102 code-behind files 113 compiling multiple files into 117 component classes compiled 651 namespaces and assemblies 212 primary interop assembly 673 private assemblies 350 shared assemblies 351 updating 103
<assemblies> subtag, <compilation> 919 Assembly directory 38 assembly reference, adding 211 Assemblylnfo.vb 208 assignment operations
reference types 86 String class 88 value types 86
attributes .NET Framework 591 control design time support 702 properties and 154, 155 Xml documents 54 7 XML tags 534, 535
Attributes property Directorylnfo class 508 Filelnfo class 508 HtmlControl class 154, 839
Authenticate() method, FormsAuthentication 774
storing user information 778 authentication
see also forms authentication; Windows authentication
<identity> tag 924 * (wildcard character) 770 ASP.NET request 761 Authentication Type property 781 authorization rules 770 debugging errors, VS.NET 231 directory authentication methods 786 Enterprise Manager 399 IBuySpy store 811 indicating success 159 IsAuthenticated property 781 IslnRole() method 781 non-ASP.NET request 761 Passport authentication 784 passwords 760 security 760 SQL Server authentication 399 user authentication 157 web service security 609
<authentication> tag, configuration files <system. web> tag 912 attributes 770 changing for subdirectory 772 forms authentication 768 mode attribute settings 913
Authentication Type property, Identity 781 authorization
access for specific users 773 access to specific directories 771 accessing specific files 772 authorization rules 770
Index
937
Index
938
default allowing access 916 forms authentication 781 machine.config default levels 930 multiple authorization rules 771 permissions 760 security 760
<authorization> tag, configuration fll.es <system. web> tag 916 allow and deny rules 773 forms authentication 770
auto format, data controls 4 70 auto increment columns
FillSchema() method 426 importance of 395 relational databases 394
AutoEventWrreup attribute, Page directive 217 autoEventWireup attribute, <pages> 927 AutoGenerateColumns property
DataGrid class 475,477, 900 automatic postback 184 AutoPostBack property
doPostBack() function 186 capturing a change event 184 CheckBox class 861 data-bound list controls example 452 ListBox class 406 ListControl class 873 page life cycle 187 RadioButton class 869 TextBox class 873 web controls 186
Autos variable watch window 229 Avg function, SQL 392
B BackColor property
TextBox class 168 Web Control class 170, 857
BacklmageUrl property DataGrid class 901 Panel class 868 Table class 870
backslash (\)character 513 BackupOperator role 789 backward compatibility, COM 160 Balance property, Account 658 BaseDataList class 891 BaseValidator class
inherited properties 886 properties 245, 887
Basic mode 786 BeginEdit() method, DataRow 378 Begin Transaction() method, Connection 382
behaviors, data types 88 bezier curve, drawing 719 BgColor property, HtrnlTable 852 bin directory 102 binaryfll.es
data types 516 opening file 515 reading and writing flat fll.es 515 ReadString() method 516 Seek() method 516
BinaryWrite() method, HttpResponse 160 BinaryWriter class 515 Bindable attribute 702 binding see data binding <binding> elements, WSDL 578 Bitmap class, GDI+ 718 bitwise arithmetic 507 blank frame targets 241
HTML controls 841 web controls 862
block completion, IntelliSense 222 Bold property, Fontinfo 173 bookmarks 841 Boolean data type 88 Border property
Htrnllmage class 844 HtrnlTable class 852
BorderColor property HtrnlTable class 852 WebControl class 170, 857
BorderStyle property e-card applet 195 WebControl class 170, 857
BorderWidth property, WebControl170, 857 Bound Column class 904
DataGrid control476 properties 904
breakpoints Breakpoints window 228 commands in break mode 227 debugging, Visual Studio .NET 226, 228
Browsable attribute 702 browscap.ini me 916 browse permission 27 Browser property, HttpRequest 158 browser type
finding user browser type 435 getting 159 web controls advantage 165
BrowserCapabilities component 158 <browserCaps>tag
<filter> subtag 917 <result> subtag 917 <system. web> tag 916 <use> subtag 917
browsers adaptive controls 708 client side caching 7 40 creating a file browser 510 evaluating 709, 916 interpreting special characters 161 rendering for browsers 708 supporting multiple browsers 708 using caching to optimise pages for 7 45
Brush object 720 buffer attribute, <pages> 926 BufferOutput property, HttpResponse 160 Build property, Common Properties 225 business layer
IBuySpy store 806 three-tier design 647
business objects ASP.NET components 649 web service comparison 589
Button class see also HtmlButton class. HTML elements underlying 167 identifying button 860 members 860 web controls 860
<button tag>, HtmlButton 138, 841 ButtonColumn class 904
Data Grid control4 76 properties 905
Button Type property Button Column class 905 EditCommandColumn class 906
By Ref parameter 86 Byte data type 88 ByVal parameter 86
c C#
accessibility keywords 76 arrays 49 choosing a .NET language 43 enumerations 51 initialization 48 migration to .NET 12 type conversion 55 variable operations 52
cache dependency 754 Cache object
ASP.NET intrinsic objects 602 data caching 748 expiry of object 748 Insert() method 749 inserting an object into cache 748
modifying cached objects 753 testing750 threads 748
Cache property Http Context class 755 HttpResponse class 160, 746 Page class 156 web service caching 608
CacheDependency class 7 49, 754 CacheDuration property,
WebMethodAttribute output caching in web services 748 web service caching 608
caching738 see also OutputCache directive <httpModules> tag 922 alternative caching strategy 7 46 basing on HTTP header 7 46 cache dependency 754 caching multiple page versions 741 client side caching 740 custom caching 7 45 data caching 738, 748, 751 database access 739 disabling caching while testing 7 40 events 744, 745 fragment caching 738, 747 HttpCachePolicy class 746, 747 inserting an object into cache 748 modifying cached objects 753 multiple caching example 743 optimising pages for browsers 745 Output caching 738, 739, 740, 746 performance 725, 729, 738 protecting important cache 742 reusability of cached page 740 session state scalability 293 specifying parameters 742 testing caching strategy 747 variation between caching strategies 7 4 7 web services 608
Calendar class 233, 881 Calendar control tag 885 date restrictions 236 FirstDayOtweek property 234 formatting 235 members882 multiple date selection 234 SelectedDate property 233 SelectionMode property 234 styles 884 subclassing controls 697, 698 TableltemStyle class 884
Index
939
Index
940
CalendarDay class 237 DayRenderevent237 properties 237 Selection Changed event 238 VisibleMonthChanged event 238
camel casing 909 CancelCommand event
DataGrid class 488, 901 DataList class 492, 897
CancelEdit() method, DataRow 378 CancelText property,
EditCommandColumn 906 caption
setting button caption 845 Catch statements
see Try ... Catch ... Finally block Category attribute 702 Causes Validation property 244
Button class 860 HtmlButton class 842 HtmllnputButton class 845 ImageButton class 864 LinkButton class 866 manual validation 250
CellPadding property BaseDataList class 891 Calendar class 882 CheckBoxList class 877 HtmlTable class 852 RadioButtonList class 879 Table class 870
Cells collection 871 Cells property
HtmlTableRow class 852 TableRow class 871
CellSpacing property BaseDataList class 891 Calendar class 882 CheckBoxList class 877 HtmlTable class 852 RadioButtonList class 879 Table class 870
certificates demonstrating security 764 SSL 766,767
CGI (Common Gateway Interface) 6 chains309 Challenge/Response authentication 787 Char data type 88 characters
character matching 255 regular expression characters 255
check boxes HtmllnputCheckBox class 845
CheckBox class HTML elements underlying 167 members 861 web controls 861
CheckBoxList class HTML elements underlying 167 list controls 876 multiple selections 175 properties 877 repeated-value data binding 440
Checked property CheckBox class 861 HtmllnputCheckBox class 846 HtmllnputRadioButton class 848 RadioButton class 869
CheckedChanged event CheckBox class 861 RadioButton class 869 web controls providing 184
Checkout.aspx page, IBuySpy 825 ChildNodescollection,XnllNode549 class based programming 656 class library
see .NET class library (under N) classes
see also code-behind class ADO.NET373 ASP.NET 123 brief description 87 building a .NET class 76
adding events 81 adding methods 79 adding properties 78 constructors 80 eventhandling82 VB6 changes 78
containment 89 control classes 243 components, creating 651, 653 data management, ADO.NET 374 database connections, ADO.NET 374 Exception class 308 inheritance 89 members74 MSDN Class Library reference 93 namespaces and 92, 95 object-oriented programming 73 objects and classes 74 subclassing controls 697 web controls 166 web services as classes 587 XML classes 536
Clear() method Array class 62 DataSet class 378 HttpSessionState class 290
Click event Button class 860 Hyperlink class 861 ImageButton class 864 LinkButton class 861, 866 web controls providing 184
client side caching 7 40 Location attribute 740 OutputCacheLocation enumeration 740 server-side caching compared 740
ClientCertificate property, HttpRequest 158 clientConnectedCheck attribute
<processModel> tag 929 client -side programming 6, 7 client -side validation 244
see also EnableClientScript property ClientValidationFunction property
CustomValidator class 259, 890 cloning
XmlNode objects 550 Close() method, Connection 382 CLR (Common Language Runtime)
benefits and drawbacks 14, 15 description 10, 14
CLR Exceptions counter, 737 CLS (Common Language Specification) 13 code reuse 646 code samples for this book 40 code transparency, CLR 15 code verification, CLR 14 code view
collapsing code 220 switching to design view 217
Codebehind attribute, Page directive 217 creating a user control680 Visual Studio .NET 117
code-behind class adding controls 140 control variables 142 creating a user control681 deriving user controls 927 deriving web forms 927 Imports statement 142 Page class 142 single event handler 142
code-behind files assemblies 113, 117 assessment of 118 hidden files 218 precompilation 113, 919
Visual Studio .NET 212 Solution Explorer 218
StockQuote web service 590 user interface code distinction 438 vbc.exe utility 113 Visual Studio .NET 117, 217 web services 590
code-behind programming 110 global.asax file 122 Page class 112, 113 Visual Studio .NET 217
coding component-based programming 645 creating components 650 data binding 438 web forms 119,202,217
collapsing code 220 collections
ASP.NET 275 controls 154, 156 Controls collection 157 data binding 432 hashtables compared 445
collections class 92 Color class 858 Color property 172, 214 colors
Drawing namespace 172 IntelliSense 223 KnownColor enumeration 858 property specifying 170 valid for .aspx control tag 858 web controls 857
Cols property, HtrnlTextArea 855 ColSpan property, HtrnlTableCell853 Columns property
DataGrid class 901 Data Table class 378 TextBox class 873
ColurnnSpan property, TableCell871 COM components 672
adding COM reference to RCW 67 4 interfaces 672
COM objects backward compatibility 160
COM technology 572 COM+ transactions 605 Command class 382
adding parameters 382 CommandText property 382 CommandType property 382 Connection property 382 Data Provider objects 381 data retrieval example 404 methods382 retrieving data 401 setting information 382 SQL statements 382, 402
Index
941
Index
942
stored procedures 382 using with DataReader 402
Command event Button class 860 ImageButton class 864 LinkButton class 866
CommandArgument property Button class 860 ImageButton class 864 LinkButton class 866
CommandBuilder class updating disconnected data 422
CommandName property Button class 860 ButtonColumn class 905 ImageButton class 864 LinkButton class 866
CommandText property, Command 382 CommandType property, Command 382 comments
XML 126 XML documents 536, 547
common data types C# and VB.NET 46 object manipulation 56
Common Properties project setting 224 CompareValidator class 243
added members 245 example web form 257 properties 888 validation controls 887
comparison operators 63 reference types 86 same value, different reference 86 value types 86
compilation ASP.NET code compilation 726 custom controls 696 performance 726 precompilation 115
<compilation> tag <assemblies> subtag 919 <compilers> subtag 918 <system. web> tag 917 attributes 918 debug attribute 349
<compilers> subtag, <compilation> 918 component-based programming 645 ComponentModel namespace
TypeConverter class 196 components
see also database components .NET components 645,647 adding custom component reference 654 business layer 648
business objects 649 classes contained 651 COM components 672 compiling component class 653 creating 650 debugging 655 .dll files 650 IBuySpy store 806 linking654 namespaces for classes 652 reasons for using 645 registering 103 simple component 651 troubleshooting advantage of 646 updating 103 using 654 using separate components 102 web services compared 650
composite controls 711 concurrency
database access 396 example427 RowUpdated event 426 updating data 426 web applications 369
conditional operators 62 Config directory 38 <configSections> tag, machine.config 910 configuration
application settings 127 ASP problems 9 ASP.NET configuration 125 changes 103 database deployment 351 machine.config file 125 session state 294, 930 sharing between ASP and ASP.NET 102 tracing931 Visual Studio .NET 203, 210 web farms 300 web service client 615 web.config file 125 XCopy deployment 351
configuration files 909 naming conventions 623 structure 910 XML529
Configuration Properties project setting 224 <configuration> tag, web.config 126 ConfigurationSettings class 130
AppSettings property 130 retrieving XML file name 910
connecting to internet problems connecting 23 using proxy class 626
Connection class 382 ADO Connection object 382 Begin Transaction() method 382 Close() method 382 ConnectionString property 397, 398 Data Provider objects 381 data retrieval example 404, 405 Open() method 382
connection pooling 728 Connection property, Command 382 connection strings
<sessionState> tag 931 adding special variable 129 common errors 305 data provider differences 388 database access 400 database component example 662 IBuySpy store 810 web.config me 666
connections ADO.NET classes 374 ADO. NET database access 727 database components 659 disconnected access 377 making a connection 400 number of connections 397 problems of state 369 SQL Server authentication 399 Try ... Catch ... Finally block 397 verifying connection 400 when to open and close 727 Windows authentication 399
ConnectionString property, Connection 398 database connections 397 Integrated Security setting 399 storing value for reuse 400
constants configuration files 910
Constraints property, DataTable 378 constructors
building a .NET class 80 custom error pages 318 overloading 81 web service proxy class 622 web service URLs 623
Contacts module, IBuySpy 829 Container class
see also HtmlContainerControl class Dataltem() method 459
containment 89 Context object 602 Context Switches counter 737 Continue command 228 Control directive 679, 680
control variables code examples 199 code-behind class 142
controls see also custom controls; data controls;
list controls; server controls; template controls; user controls; validation controls; web controls
adaptive controls 708, 709 adding 140, 218 ASP.NET controls 137 code access to controls 842 collections154,156,170 composite controls, creating 711 configuring, Visual Studio .NET 214 creating web control 706 data binding 431, 449
repeated-value data binding 440 deriving user controls 927 disabling 154 disabling state management 154 generating new controls 158 grouping 867 hiding867 how a web control works 84 HTML control events 151 HTML control properties 140 HTML elements underlying classes 167 HTMLforms5 HTML server controls 136, 138 Htrnlinputlmage control152 Internet Explorer controls 262 LostFocusTextBox control 705 maintaining state 710 parent controls 154 prefixes 177 returning contents as a string 156 rich controls 233, 261, 879 subclassing controls 697 tracing control tree 337 type of input control156 using inheritance to create 695 validation controls 243 ViewState property 276 visibility of 154, 170 web controls 165, 857
Controls collection 157 adding child controls 181
Controls property HtrnlControl class 154 Page class 156 WebControl class 170
ControlToCompare property CompareValidator class 888
Index
943
Index
944
ContralTo Validate property BaseValidator class 245, 887
conversions see type conversions converting objects 91 CookieContainer property, proxy class 629 cookieless attribute, <sessionState> 294, 931 cookies
custom cookies 285 customization 77 4 disabled cookies 285 encoding authentication cookie 925 example 286 expiration 770 flle access 515 forms authentication 774 forms authentication settings 914 IBuySpy store 812, 819, 823 IsCookieless property 290 path 770 persistence 286, 776 removing 286 rule of thumb for use 285 security cookies 768, 770, 771 session cookies 627 session state 288 session tracking 289 state management 627
Cookies collection objects providing 286 tracing338
Cookies property, HttpRequest 158, 160 coordinates, x andy 720 Copy Project feature 352 Copy() method, File 504 CopyTo() method, Filelnfo 509 Count function, SQL 392 Count property, HttpSessionState 290 CounterCreationData class 737 counters
performance counters 734 view state example 275
CounterSample class 737 CPU Utilization counter 736 Create() method
Directorylnfo class 508, 509 Filelnfo class 508, 509
CreateAttribute() method, XmlDocument 547 CreateComment() method, XmlDocument 547 CreateDirectory() method, Directory 503 CreateElement() method, XmlDocument 547 CreateEventSource() method, EventLog 325 CreateFileList() procedure 507 CreateObject() method, ServerUtility 160 CreateSubdirectory() method
Directorylnfo 509
CreateText() method, File 513 Creation Time property
Directory Info class 508 Filelnfo class 508
CredentialCache class 791 credentials, Windows authentication 791 <credentials> subtag, <forms> 778, 914
passwordFormat attribute 780, 915 <user> tag 915
credit card numbers regular expressions 257
cross-platform compatibility web services 598
cross-platform support, CLR 15 .cs flies 101, 110 .csproj files 101 CSS (cascading style sheets)
name/value collection of properties 839, 858 style attributes 149 Style property 154
.css files 349 CtrlChanged() subroutine 190 CType() function
explicit type conversions 55 template controls 488
culture settings, <globalization> tag 920 currency converter 134 Currency data type 466 Current property, HttpContext 589 CurrentPagelndex property, DataGrid 901 cursors370 curves, drawing and filling 719 Custom Actions designer 356 custom controls 679
adding a reference 699 compiling 696 consuming 696 derived custom controls 695 design time support 701
attributes 702 developing in VS.NET 699 events 714
event handling 717 mixing with custom images 724 My Base keyword 702 overriding Render methods 702 postbacks 714 toolbox with 700 using inheritance to create 695
custom cookies 285 cookies example 287 data types 302 forms authentication 768 lifetime 302 performance 302
scope 302 security 302 state management options 302 storage location 302
custom error pages 330, 331 constructors 318 IBuySpy store 811
Custom Errors tab 32 custom exception classes 317 custom images 724 custom logs 324 custom objects
storing in view state 280 WSDL documents 601
custom settings AppSettings property 130 web.config file 128
custom text, drawing GDI+ 721 CustomersDB component classes, IBuySpy 806 CustomersDB.Login() method, IBuySpy 823 <custornErrors> tag
<error> subtags 920 <system. web> tag 919 attributes 919
CustomerXyz stored procedures, IBuySpy 804 Custom Validator class 243
D
added members 245 ClientValidationFunction property 259 example web form 258 members890 validation controls 889
data adding 412 deleting 410 modifying 409, 420 retrieving 406 updating 407, 422, 424
data access see also data providers; database access ADO.NET 365, 387 customized providers 387 DataSet data as XML 529 importing namespaces 397 making the connection 397,400 OLE DB data classes 387 steps in simple data access 396
data binding 431 activating 432 arrays 432 caution using VS.NET 436 coding438
collections 432 creating a me browser 513 creating a file list 507 data controls 891 database component, using 664 databases, with 448 data-bound list controls example 450 DataGrid control475 DataList control895 DataList using templates 457,467 DataSet object 450 DataTable class
sorting and filtering with Data View 498 Data View modification 498 errors 438 hash tables, data binding with 445, 446 how it works 432 HtrnlSelect class 850 IBuySpy store 815 list controls 441 performance 728 repeated-value binding 432, 440 single-value data binding 432, 433 sorting and filtering with Data View 498 sorting bound data 498 template controls 457
multiple templates 467 types in ASP. NET 432 using a template 460 view state and 444 XrnlTextReader class 543
data caching 738, 7 48 Application state compared 738 DataSet example 751 replacing state management 725 web services 608, 755
data control styles/templates 481 data controls 891
BaseDataList class 891 data binding 891 DataGrid control899 DataList control895 Repeater control892 templates 891
data layer IBuySpy portal832 IBuySpy store 802 three-tier design 647
data management ADO.NET365 ADO.NET classes 374
data namespaces 376
Index
945
Index
946
data objects 377 ASP.NET components 649 data modelling objects 377 enhancing components with 668 StockQuote web service 598
Data Provider objects 379 Command class 382 Connection class 382 DataAdapter class 382 DataReader class 380, 382 DataSet class 380
data providers see also data access .NET versions 374 ADO.NET374 amending retrieved data 382 class derivation 374 code to data source 375 Data Provider objects 379, 381 differences 387 different operations 387 naming conventions 381, 387 reading data quickly 382 SQL Server data provider 374,387 translating code between 387
data retrieval40 1 automatic postback 406 example403 performance 728
data types .NET languages 46 behaviors 88 binary files 516 C# and VB.NET 46 changes from VB6 48 class library 46 data binding format string 466 data provider differences 388 object manipulation 56 reference types 85, 88 state management options 302 value types 85, 88 variable prefixes 49 web service communication limitations 582 web services 587, 597
DataAdapter class 382 CommandBuilder object 422 commands 383 data binding with databases 449 Data Provider objects 381 FillSchema() method 426 methods 383 modifying disconnected data 420 properties 383 RowUpdated event 426
selecting disconnected data 415 Update() method 422, 423 updating data 384 updating disconnected data 422
database access see also data access AD0370 ADO.NET727 caching 739 concurrency 396 connectionstrings400 Internet applications 385 selecting database 390
database components 659 aggregate functions 667 enhancing with data object 668 error handling 666 example659
database connection string see connection strings
database connections see connections database constants, web.config 645 database profiling 728 databases
see also ADO.NET components 659 connections 659 data access 365, 387 data binding with 448 deployment configuration 351 encapsulation 659 internet database access 368 isolation from web page 649 obtaining sample database 388 relational databases 366 transactions in web services 605 XMLand533
DataBind() method BaseDataList class 892 Control class 432, 433 ListControl class 874 Repeater class 893 single-value data binding 436
DataBinder class Eval() method 465
DataColumn class 379 DataField property, BoundColumn 904 DataFormatString property
BoundColumn class 904 DataGrid class 899
AllowPaging property 494 AllowSorting property 497 AutoGenerateColumns property 475 BaseDataList class inheritance 899 binding with auto-generated columns 475
Bound Column class 904 Button Column class 904 Cancel Command event 488 comparing template controls 475 configuring styles 478 data control styles 481 data control templates 481 defining columns 476 EditCommand event 487 EditCommandColumn class 486, 905 editing with 486 example using templates 4 77 hiding columns 478 HyperLinkColumn class 906 IBuySpy store 820 members900 PagelndexChanged event 495 PagerStyle property 494 paging494 repeated-value data binding 440 selecting items 482 SortCommand event 497 SortExpression property 497 sorting with 496 styles 902 TemplateColumn class 907 templates 899 UpdateCommand event 488
DataGridColurnn class 903 DataGridltem class 902 Dataltem property
DataGriditem class 902 DataListltem class 897 Repeaterltem class 893
Dataltem() method, Container 459 DataKeyField property
BaseDataList class 891 DataList class 491
DataKeys property, BaseDataList 892 DataList control 895
adding item template 459 BaseDataList class inheritance 895 CancelCommand event 492 comparing template controls 472 data binding with templates 457 data control styles 481 data control templates 481 DataKeyField property 491 DataListltem class 897 EditCommand event 492 editing with 490, 492 file access example 516 Find Control() method 493 IBuySpy store 814, 816, 817 Item Command event 484
layout features 4 73 members896 multiple templates 467 repeated-value data binding 440 Selectedlndex property 485 selecting items 483 sorting with 498 styles 898 tag representation 458 templates 490, 898 templates with ASP.NET controls 465 UpdateCommand event 493
DataListltem class 897 DataMember property
BaseDataList class 891 data binding controls 449 ListControl class 873 Repeater class 893
DataNavigateUrlField property HyperLinkColumn class 907
DataN avigate UrlFormatString property HyperLinkColumn class 907
DataReader class 382 data providers 380, 381 data retrieval example 404 performance 383 Read() method 382 retrieving data 401 using with Command object 402
DataRelation class 379 adding objects to DataSet 418 creating DataRelation objects 417 DataRelation restrictions 420 DataSet object 377
DataRow class 378 methods 378 Rows collection 415
DataRowState DataSet storing row state 423
DataSet class 377 acccessing as XML 564 acccessing XML through 566 AcceptChanges() method 378 adding DataRelation objects 418 Clear() method 378 concurrency 426 containing data 374 data as XML 529 data binding 450 data binding with databases 449 data caching 738 data caching in web service 755 Data Provider objects 380 database access, ADO.NET 370, 384 database component example 660
Index
947
Index
948
DataColumn objects 379 DataRelation objects 379 DataRow class 378 Data Table class 378 Enhanced DataSet 373 filtering cached DataSet 752 GetChanges() method 378 Merge() method 378 modifying disconnected data 420, 421 paging and performance 496 ReadXrnl(} method 378 RejectChanges() method 378 Relations property 377 Remove() method 421 retrieving data 40 1 selecting disconnected data 415 storing row state 423 Tables property 377 updating data 384 updating database, ADO.NET 370 using disconnected data 414 using with ADO.NET 380 web service data types 598 working with related tables 430 WriteXmlO method 378 XML in ADO.NET 563 XML Integration compared 372
DataSource property BaseDataList class 891 ListControl class 873 Repeater class 893
Data Table class 378 DataSet object 377 Data View object 379, 498 filtering cached DataSet 753 methods378 properties 378
DataTextField property Button Column class 905 HyperLinkColumn class 907 ListControl class 873 using in data binding 446
DataTextFormatString property Button Column class 905 HyperLinkColumn class 907
DataTextFormattingString property ListControl class 873
DataValueField property, ListControl873 using in data binding 44 7
Data View class 379 data binding modification 498 filtering bound data 499 modifying settings 498 sorting and filtering with 498 sorting bound data 498
DataXyz properties, HtmlSelect 850 Date data types
data binding format string 466 Date property, CalendarDay 237 Date property, DateTime 60 DateTime class 59
members60 Now property 121
DateTime data type 88 Day property, DateTime 60 DayHeaderStyle property, Calendar 884 DayNameFormat property, Calendar 882 DayOtWeek property, DateTime 60 DayRender event
Calendar class 883 Calendar Day class 237
Days property, TimeSpan 61 DaysinMonth() method, DateTime 60 DayStyle property, Calendar 884 DBUtil component class 668 DCOM573 debug attribute, <compilation> 349, 918 debugging
breakpoints 226 commands in break mode 227 components 655 Copy Project feature 353 disabling caching while testing 7 40 errors, VS.NET 230 problems, VS.NET 230 single step debugging 226 tracing333 using Response.Write() 333 Visual Studio .NET 17, 202, 225, 334, 666
decimal data type 88 decryptionKey attribute, <machineKey> 926 deep language integration, CLR 14 default.aspx page
default login page 770 IBuySpy store 812
DefaultCredentials property 791 defaultLanguage attribute, <compilation> 918 defaultRedirect attribute, <custornErrors> 919 DefaultValue attribute 702 <definitions> element, WSDL 575 delegates 69, 71, 87 Delete statement, SQL 396
data deletion example 410 example407 executing 407 SQL basic concepts 389
Delete() method DataRow class 378
modifying disconnected data 420, 421 Directory class 503
Directorylnfo class 508 File class 504 Filelnfo class 508
DeleteCornmand event DataGrid class 901 DataList class 897
DeleteCommand property, DataAdapter 383 <deny> rule, <authorization> tag 773
machine.config me 916 web.config settings 787
dependencies CacheDependency object 754
dependencies parameter Insert() method, Cache object 749
deployment ASP problems 9 ASP.NET websites 347 Copy Project feature 352 database configuration 351 debug mode 349 deploying using VS.NET 352 liS security settings 352 registering components 103 running setup 359 simple site example 348 Visual Studio .NET 202, 349
performance 350 web setup projects 352, 354 Windows account permissions 352 XCopy deployment 351
derived custom controls 695 Description attribute 702 design
design time support 701, 702 design view 217 three-tier design 647 web setup projects 355
Designer Defaults property page Common Properties 225
destination page target window or frame 841
development testing ASPNET user account 41
Digest mode 786 digital certificates, SSL 767 directives
applications, ASP.NET 110 importing namespaces 118 OutputCache directive 739 Page directive 117
directories see also virtual directories ASP.NET installation 37 authentication methods 786 authorizating access to 771 bin directory 102
getting 158 permissions 507 security settings 785
Directory class 502, 503, 504 Directory property, Filelnfo 509 Directorylnfo class 502, 507, 508, 509 DirectoryName property, Filelnfo 509 Disabled property, Htrn1Control154, 839 DISCO (web service discovery) 583
web service standards 574 .disco files 101 disconnected access
ADO.NET characteristics 370 coding414 concurrency 396 connectivity 377 data objects 377 modifying data 420 selecting data 415 state 273 updating data issues 370
disconnected Recordset, ADO 384 discovery
ASP.NET applications 101 dynamic discovery 584 TerraService web service 634
Discussion module, IBuySpy 829 Display property
BaseValidator class 245, 887 RangeValidator class 248
Display Mode property ValidationSummary class 891
DISTINCT keyword, SQL 392 distributed technologies 16 <diV> element 167 DivideByZero exception 310
common errors 305 custom exception classes 318 DivideByZeroException class 313 throwing exceptions 316
.dll files assembly files 95 components 650 database component, using 663 debugging components 655 deploying VS.NET project 349 using components 654
DNS (Domain Name Service) 347 getting DNS name 159
Do loops, Visual Basic 66 DOCUMENT object
configuring, Visual Studio .NET 216 Document property, Xml886 document tab 31 <documentation> tags, WSDL 591 DocumentContent property, Xml886
Index
949
Index
950
Documents module, IBuySpy 829 DocurnentSource property, Xml 886 domain names 34 7 Domain parameter, WSDL.exe 624 doPostBack() function 186, 714 DotNetNuke project 835 double data type 88 downloads, MSDN 206 Drawing namespace
colors 172 KnownColor enumeration 196
drawing space, GDI+ 718 DrawXyz methods, Graphics 719 DropDownllst class
HTML elements underlying 167 HtmlSelect class 850 list controls 875 multiple selections 175 repeated-value data binding 440
Duration attribute, OutputCache directive 739 dynamic graphics, GDI+ 718, 723 dynamic web pages
ISAPI and ASP.NET 6 <dynarnicDiscovery> element 584
E e As EventArgs parameter 691
event handling 143 Htmllnputlmage control152
e-card applet 190 e-commerce sites
data driven ASP.NET applications 366 IBuySpy store 797, 802
EditCommand event DataGrid control487, 901 DataList control492, 897
EditCommandColumn class 905 Data Grid control4 76, 486 properties 906
Editltemlndex property DataGrid class 901 DataList class 896 template controls 485
EditltemStyle property Data Grid class 903 DataList class 898
EditltemTemplate property DataList class 898 TemplateColumn class 908
EditText property, EditCommandColurnn 906 ellipse, drawing and filling 719 email
automatic logging 527 issue reporting form 525 sending mail 524
email address regular expression 256
enable attribute, <processModeb 928 EnableClientScript property
BaseValidator class 887 manual validation 250 validation example 247 ValidationSummary class 891
EnableClientSideScript property BaseValidator class 245
enabled attribute tracing343 <trace> tag 932
Enabled property BaseValidator class 245 WebControl class 170, 858
EnableSession property, WebMethod attribute
web services state management 603 EnableSessionState attribute, Page directive 216
<pages> tag 926 EnableViewState attribute, Control directive
<pages> tag 926 disabling view state 727
EnableViewState property data binding and view state 444 HtmlControl class 154 maintaining control state 710 Page class 156 validation example 246 WebControl class 170
EnableViewStateMAC attribute view state encryption 277
encapsulation ASP.NET components 649 component with data object 668 database component example 662 databases 659
encoding <globalization> tag 920 <machineKey> tag 925 type used by browser 843
Encoding property, MailAttachment 524 encryption
decryptionKey attribute 926 forms authentication 774, 779,914 how SSL works 767 IBuySpy store 803 impersonation 794 security cookies 770 SSL 766 System.Security.Cryptography
namespace 781 view state 277
Enctype property, HtmlForm 843 EndEdit() method, DataRow 378
EndRequest application event 122 Ends With() method, String class 58 Enhanced DataSet, ADO.NET 373 Enterprise Manager
authentication 399 SQL Server 367
EnterpriseServices assembly 605 enumerations
brief description 87, 685 C# and VB.NET 51 enumerated values 171 setting an enumeration 171 UnitType enumeration 171 web service data types 598
equality testing 86 String class 88
error handling .NET306 configuration 910 database component 666 structured error handling 307
error modes 330 error pages 328
controlling 307 custom error pages 330, 331 structured exception handling 315
<error> subtags, <customErrors> 920 ErrorMessage property, BaseValidator 245, 887
manual validation 251 errors
<customErrors> tag 919 behaviors 331 checking, Visual Studio .NET 201 CLR15 common errors 305 custom exception classes 317 data binding 438 debugging, VS.NET 230 error message display 887 Exception classes 308 IntelliSense 222 On Error Goto statement 307 type conversion 55 Visual Studio .NET 17
Errors Total counter 736 Eval() method, DataBinder 465 event handling
adding event handler 219 AdRotator class 242 building a .NET class 82 conneting explicitly 217 Handles clause 143 HtrnllnputButton class 140 multiple events 743 parameters 143
ServerClick event 841 single event handler, 142 subclassing controls 697 TablePage class 180 validator controls 258
Event keyword 688 event logging
custom logs 324 Event Log security 324 event tracker application 187 EventLog class 322 exception logging 319 Log() subroutine 190 logging email527 retrieving log information 326
EventArgs object 152 event -driven programming, VBScript 45 EventLog class 322
retrieving log information 326 security 324
events .NET event parameters 691 application events 122 AutoPostBack property 184, 197 building a .NET class 81 caching744
variation between caching strategies 7 4 7 caching event-driven pages 745 classes and objects 74 connecting declaratively 82 CtrlChanged() subroutine 190 custom control events 714 delegates 71 e As EventArgs parameter 691 eventlogging319, 321,325,328 event tracker application 187 event viewer 320, 323 EventArgs object 152 EventLog class 322 HTML server controls 136 Htrnllnputlmage control I 52 naming conventions 144 Page.Load event 145 runat="server" attribute 144 sender As Object parameter 691 ServerChange event 152 ServerClick event 151 user control events 688 using events with parameters 691 web controls providing 184 web forms 140 Windows event logs 320 WithEvents keyword 190, 197 XrnlDocument class 551
Events module, IBuySpy 829
Index
951
Index
952
Exceps Thrown counter 737 Exception class
catching same class exceptions 311 properties 308 throwing exceptions 316
exception handling 310 example showing 313 nested exception handlers 312 ovelapping handlers 313 structured exception handling 315
exceptions .NET Framework 307 block structure 307 Catch statements 311 catching same class exceptions 311 custom exception classes 317 DivideByZeroException 310, 313 exception chains 309 Exception classes 308 Exception object 308 me access 507 logging exceptions 319 multilayering 307 null reference exception 313 object-based exceptions 307 OleDbException 313 structured error handling 307 throwing exceptions 316 troubleshooting 309 Try ... Catch ... Finally block 312 types 307
.exe files 95 execute permission 27 ExecuteNonQuery() method, Command
382,407 data update example 410
ExecuteReader() method, Command 382, 402 ExecuteScalar() method, Command 382 execution Timeout attribute,
<httpRuntime> 924 Exists property
Directorylnfo class 508 Filelnfo class 508
Exists() method Directory class 503 File class 504
explicit attribute, <compilation> 918 Exponential data type 466 extensibility, VS.NET 202 Extension property
Directorylnfo class 508 Filelnfo class 508
F me access
cookies 515 exceptions 507 guest book example 516 intranet applications 502 shared or instance class members 503 simple file access 502 web applications 501, 502
File class state 657 methods 504 retrieving information about files 502
flle mappings virtual directories 33 web.config file 126
File System designer 356 file types 101
ASP.NET applications 100 mapping to .NET classes 921 restricted me types 760
File Types designer 356 file uploads 521
maximum size 523 FileAttributes enumeration 507 Filelnfo class 507
creating a file list 507 creating objects 509 methods 508, 509 properties 508, 509 retrieving information about files 502 state 657
Filename property, MailAttachment 524 files
adding in VS.NET 210 authorizating access to 772 creating a file list 505 hidden code-behind flles 218 HtrnllnputFile class 846 reading and writing flat files 513 retrieving me size 504 retrieving information about 502 setting max. upload size 924 using flles with web applications 501
FileStream class 720 Fill() method, DataAdapter 383,415 FillSchema() method, DataAdapter 383, 426 FillXyz() methods, Graphics 719 <fllter> subtag, <browserCaps> 917 filtering bound data 499 Finally statements
see Try ... Catch ... Finally block
FindControl() method DataList class 493 template controls 488 Page class 831
FirstDayOfWeek property, Calendar 234, 882 Fixed Decimal data type 466 flow layout mode, VS.NET 336 FlowLayout page, VS.NET 213
Flush() method, Stream Writer 514 focus
control losing focus 704 LostFocusTextBox control 705 web controls 858
Font property Fontinfo class 173 WebControl class 170, 858
Fontinfo class 173 fonts
drawing custom images 722 web controls 858
FontUnit type 17 4 Footer class 686 footer user controls 682, 683 FooterStyle property
DataGrid class 903 DataList class 898
FooterTemplate property DataList class 898 Repeater class 894 TemplateColumn class 908
FooterText property, DataGridColumn 903 ForeColor property
Base Valida tor class 245 TextBox class 168 WebControl class 170, 857
<form> tag creating a simple application 106 HtmlForm class 138, 842
formatting Eval() method 465 format strings 466 Repeater control4 79 template styles, using 468
forms see also HtmlForm class cookie security 288
forms authentication 768 <authentication> tag setting 913 <forms> tag attributes 913 access for specific users 773 access to specific directories 771 accessing specific files 772 ASP.NET model 768 associating user with role 782 attributes/ settings 770
authorizating roles 781 authorization rules 770 custom cookies 768 encoding cookie 925 encryption 779 impersonation 793 login page 773 multitiered user access 781 passwords 779 restricting anonymous users 770 roles 781 settings 769 steps to implement 768 user lists 777 web services 793 web.config settings 768
forms collection 339 <forms> tag
<credentials> subtag 778, 914 attributes 913 authentication mode 768
FormsAuthentication class login page 773 methods 774 properties 77 4
FormsCookieName property FormsAuthentication class 774
FormsCookiePath property FormsAuthentication class 774
fragment caching 738, 7 4 7 caching generic portion of page 740 event-driven pages, using 745 OutputCache directive 747
frame targets AdRotator class 241 web controls 862
frames, website navigation 271 Friend keyword 76 From clause, SQL 391 Fromlmage() method, Graphics 718 Fromxyz() methods, TimeSpan 61 FrontPage Server Extensions 354 FTP directory 505 FullName property
Directorylnfo class 508 Filelnfo class 508
Function keyword 67 functions 67
methods using 662 parameter signatures 68 web service caching 608 web service visibility 600 web services 589
FundTransfer() method 658
Index
953
Index
954
G GAC (global assembly cache) 351 garbage collection, CLR 14 GDI+ 718
advanced features 721 Bitmap class 718 drawing custom images 722 drawing custom text 721 drawing space 718 dynamic graphics 718, 723 graphics context 718 placing images inside web pages 722
General property, Common Properties 225 GenericPrincipal class 782 GeoTrust certificate authority 764 get procedure 78 GetAttributes() method, File 504
creating a file list 507 GetAuthCookie() method,
FormsAuthentication 774 GetBaseException() method, Exception 308 GetCategories() method
database component example 660 enhancing component with data object 669
GetChanges() method, DataSet 378 updating a data table 424
GetChildRows() method, DataRow 378 GetCreationTime() method
Directory class 503 File class 504
GetCurrentDirectory() method, Directory 504 GetCustomerDetails() method, IBuySpy 809 GetDirectories() method
Directory class 503 Directorylnfo class 509
creating a file browser 510 GetFileName() method 523 GetFiles() method
Directory class 503, 507 Directorylnfo class 509, 510
Getlnfo() method 655 Getltems() method
database component example 660, 662 enhancing component with data object 669
GetLastAccessTime() method Directory class 503 File class 504
GetLastWriteTime() method Directory class 503 File class 504
GetLogicalDrives() method, Directory 503 GetLowerBound() method, Array 62 GetNames() method
KnownColor enumeration 196
GetParent() method, Directory 503 GetPlaceFacts() method, TerraService 636 GetPlaceList() method, TerraService 636, 639 GetPostBackEventReference() method 714,715 GetProcessHistory() method
ProcessModellnfo class 730 GetProcesslnfo() method
ProcessModellnfo class 730 GetRedirectUrl() method
FormsAuthentication class 774 GetShoppingCartiD() method, IBuySpy 819 GetTile{) method, TerraService 638 GetUpperBound{) method, Array 61, 62 global.asa files 102 global.asax files 120
Application_Authenticate event 782 ASP.NET applications 101 code-behind programming 122 deploying VS.NET project 349 HttpApplication class 123
<globalization> tag, <system. web> 920 GlobalSign certificate authority 764 GotDotNet web services 641 graphics
embedding dynamic graphics 722 Graphics class
DrawXyz{) methods 719 FillXyz{) methods 719 Fromlmage() method 718 GDI+ 718 measuring pixels 720 methods 719
graphics context Brush object 720 GDI+ 718 Pen object 720
grid layout problems 704 GridClick event
RaisePostBackEvent() method 715 GridLayout page
combining layout modes 213 Visual Studio .NET 213
GridLines property BaseDataList class 892 Table class 870
GroupName property, RadioButton 869 Guest role 789 GUID (globally unique identifier), 501
H Handles clause 143 Handles keyword 217
HashPasswordForStoringlnConfigFileO method FormsAuthentication class 774 hashing passwords in web.config file 779 storing user account information 780
hash tables binding using Data ValueField property 44 7 collections compared 445 data binding 445, 446
Header.ascx file, IBuySpy 814 HeaderimageUrl property
DataGridColumn class 903 headers
caching based on HTTP header 746 user control headers 682 headers collection 339
Headers property, HttpRequest 159 HeaderStyle property
DataGrid class 903 DataList class 898
HeaderTemplate property DataList class 898 Repeater class 894 TemplateColumn class 908
HeaderText property DataGridColumn class 903 ValidationSummary class 891
Height property Htmllmage class 844 HtrnlTable class 852 Web Control class 170, 858
HelpLink property, Exception 308 hidden data
HtmlinputHidden control847 web controls 858
HorizontalAlign property BaseDataList class 892 Panel class 868 Table class 870 TableCell class 871 TableitemStyle class 884 TableRow class 871
Hour property, DateTime 60 Hours property, TimeSpan 61 HRefproperty, HtrnlAnchor 841 HTML
basic syntax rules 134 control classes 138 currency converter 133 early websites 3 special characters 162 template controls 457, 462 tutorials 4, 135 use of tags 3 view state 137
HTML controls 839 HTML control events 151 HTML server controls 839 inheritance 154 mapping to HTML tags 839 postback 183 properties 140, 839 read only 839 rendering 839 web controls compared 165, 857
HTML elements adding, Visual Studio .NET 216 configuring as server control216 object interface 136
HTML encoding HttpServerUtility class 157
HTMLforms4 ASP.NET controls 137
Html module, IBuySpy 829 HTML server controls 136
control events 151 EventArgs object 152 inheritance 150 uploading flies 521
HTMLtags content between 155 mapping to HTML controls 839 runat="server" attribute 839 server control classes 138 text between 155 web controls compared 839 XML tags compared 532
HtrnlAnchor class 138, 840 members 841 properties 140
HtmlButton class 138, 841 members842
HtmlContainerControl class 155 properties155,840
HtmlControl class 150, 154 inheritance from 150 properties 154
HtrnlDecode() method, ServerUtility 160, 162 HtrnlEncode() method, ServerUtility 160,
161, 162 HtrnlForm class 138, 842
properties 843 uploading files 521
HtmlGenericControl class 139, 843 properties 140, 843
Htmllmage class 138, 843 properties 140, 151, 844
HtrnlinputButton class 138, 844 members845 ServerClick event 140
Index
955
Index
HtmllnputCheckBox class 139, 845 HttpBrowserCapabilities class members 846 evaluating browser 916 properties 140 linking to 158
HtmllnputControl class HttpCachePolicy class 746 properties 156, 840 OutputCache directive 747
HtmllnputFile class 139,846 HttpContext class PostedFile object 521 Current property 589 uploading files 521 HttpCookie class 286 properties 847 HttpForbiddenHandler class
HtmllnputHidden class 139, 847 key file requests 921 properties 847 restricted file types 760
Htmllnputlmage class 139, 152 <httpHandlers> tag EventArgs object 152 <add> subtag 922 properties 140 <remove> subtag 922
HtrnllnputRadioButton class 139, 847 <system. web> tag 920 members 848 <httpModules> tag properties 140 <add> subtag 923
HtmllnputText class 139, 848 <remove> subtag 923 members 849 <system. web> tag 922 properties 140 HttpRequest class 158
HtmlSelect class 139, 849, 854 current web request 157 members850 properties 158 properties 140 HttpResponse class 159 repeated-value data binding 440 members 160
HtmlTable class 139,851 Response property 124 properties 852 setting web response 157
HtmlTableCell class 139, 852 <httpRuntime> tag properties 853 <system. web> tag 923
HtrnlTableRow class 139, 852 attributes 924 properties 852 HttpServerUtility class 157
HtmlTextArea class 139, 854 HttpSessionState class members 855 members290 properties 140 using session state 289
HTTP Hyperlink class authentication cookie 914 HTML elements underlying 167 configuring runtime settings 923 LinkButton control compared 865 state 369 properties 862 transmission of web services 587 query strings 282 web service standards 574 web controls 861
HTTP channels 573 HyperLinkColumn class 906 HTTPGET580 DataGrid control476
<httpHandlers> tag 922 properties 907 SOAP compared 581 web services testing 597
I WSDL message definition 577 HTTP headers IBuySpy case studies 797
name/value collection 159 download page 799 HTTP POST 580 installing application 797
<httpHandlers> tag 922 installing database 801 SOAP compared 581 VB or C# versions 800 WSDL message definition 577 IBuySpy portal 799, 827
HttpApplication class architecture 833 global.asax file 123 customizing 831 inheriting from 124 data layer 832 Response object 123
956
modules 829 user interface 827
IBuySpy store 799, 802 AddToCart.aspx page 818 Checkout.aspx page 825 data layer 802 Default.aspx page 812 home page 812 Login.aspx page 821 Menu.ascx user control814 naming conventions 809 online documentation 814 ProductsList.aspx page 816 Register.aspx page 822 ShoppingCart.aspx pages 820 stored procedures 804 web pages 812 web services 810 web.config file 810
IBuySpy website 798 icons
drawing an icon 719 web folders 28
Identity object multitiered user access 781 properties 781
<identity> tag, web.config 793 <system. web> tag 924 <trust> tag relationship 925 attributes 925
idleTimeout attribute, <processModel> 928 If blocks 63 IHttpModule interface 923 liS (Internet Information Services)
see also virtual directories ASP.NET interaction 761, 762 configuration 103, 913 creating a simple application 104, 107 debugging errors, VS.NET 230 deployment configuration 352 liS 6 process model 730 installing 20 managing virtual directories 28 permissions 31 sending mail524 web requests 760 web services 573 Windows authentication 784, 785
IL (Intermediate Language), 12 converting code to 44
Image class see also Htmllmage class adding linked images 147 HTML elements underlying 167 placing images inside web pages 722
properties 863 web controls 862
Image module, IBuySpy 829 ImageAlign property
Image class 863 ImageButton class 864
ImageButton class HTML elements underlying 167 members864 web controls 863
ImageClickEventArgs class 152 images
adding linked images 147 alignment844,863,864 drawing an image 719 drawing custom images, GDI+ 722 graphics context 718 Htmlimage class 138 IBuySpy store 804 placing inside web pages 722 saving to valid stream 720 sizing bitmaps correctly 718 text alternative to image 844, 863, 864
Image Uri element, Advertisement file 240, 880 Image Uri property
Hyperlink class 862 Image class 863 ImageButton class 864
<img>tag Htmlimage class 843 placing images inside web pages 722 related control classes 167
impersonate attribute, <identity> 925 Impersonate() method, Windowsidentity 794 impersonation 793
<identity> tag 924 encryption 794 <processModel> tag 928 programmatic impersonation 794 security 760 specifying account to run code 924
importing namespaces 117 Imports property, Common Properties 225 Imports statement
adding references compared 212 code examples 199 code-behind class 142 namespaces 94
Impressions element, Advertisement file 240,880
independent user controls 683 indexes, database performance 728 IndexOf() method, Array 62 IndexOf() method, String 59 infrastructure, .NET Framework 16
Index
957
Index
958
inheritance 89 configuration inheritance 127 custom exception classes 317 derived custom controls 695 HTML server controls 150 HtrnlControl class 154 HttpApplication class 124 Mustlnherit keyword 681 Page class 124, 679 subdirectories 127 UserControl class 679 web controls 169, 706 web form inheritance 112 web pages 156 WebService class 589
Inherits attribute, Page directive 217 Inherits attribute, Control tag 683 initialization 48 InitialValue property
RequiredFieldValidator class 889 InnerException property, Exception 308, 309 InnerHtrnl property
HtrnlAnchor class 841 HtmlButton class 842 HtmlContainerControl class 155, 840 HtrnlGenericControl class 843 HtrnlTableCell class 853
InnerText property HtmlAnchor class 841 HtmlButton class 842 HtmlContainerControl class 155, 840 HtmlGenericControl class 843 HtrnlTableCell class 853 transformations 161
input controls see also HtrnllnputXyz classes HTML input controls 840
<input> tags 844,845,846, 847,848 HtmlXyz classes 138 TextBox class 872 related control classes 167
Insert statement, SQL 394 data insertion example 412 example407 executing 407 SQL basic concepts 389
Insert() method, Cache class 7 49 String class 58
InsertAfter() method, XmlDocument 547 InsertBefore() method, XmlDocument 547 InsertCommand property, DataAdapter 383 installation
ASP.NET 37, 38 liS 20
instance class 660 instance members 75 instantiation
New keyword 77 integer data type 88 Integrated mode
Windows authentication methods 787 Integrated Security setting
ConnectionString property 399 integrated user controls 685 IntelliSense
block completion 222 colors 223 errors 222 member list 221 overloading 221 Visual Studio .NET 17, 220, 221
interfaces brief description 87 COM components 672 object interface 136 RCW672
internal keyword 76 internet
connecting to 23 evolution of web development 3
internet applications COM revolution 572 current architecture 571 database access 385 web services 572
Internet Explorer controls 262 MultiPage control266 TabStrip control266 Toolbar control264 Tree View control268
intranet applications file access 502 security 762
intrinsic objects 602 IP (Internet Protocol) adresses 347
domain names 34 7 getting 159
ISAPI 6 IsAuthenticated property
HttpRequest class 159 Identity class 781
IsCookieless property, HttpSessionState 290 IslnRole() method, User 781 IsLeapYearO method, DateTime 60 IsNewSession property, HttpSessionState 290 isolation, client-side programming 7 IsOtherMonth property, CalendarDay 237 IsPostBackproperty, Page 145, 157
data binding 448 data binding and view state 444
IsSecureConnection property, HttpRequest 159 IsSelectable property, Calendar Day 237 issue reporting form 525 IsToday property, Calendar Day 237 Is Valid property, BaseValidator 245, 887 Is Weekend property, CalendarDay 237 Italic property, Fontinfo 173 item parameter
Insert() method, Cache object 749 ItemCommand event
Data Grid class 902 DataList class 484, 897 Repeater class 893
Item Created event DataGrid class 901 DataList class 897 Repeater class 893
ItemDataBound event DataGrid class 901 DataList class 897 Repeater class 893
Itemlndex property DataGridltem class 902 DataListltem class 897 Repeater Item class 893
Items property DataGrid class 901 DataList class 896 HtmlSelect class 851 list control145 ListControl class 874 Repeater class 893
ItemStyle property Data Grid class 903 DataList class 898
Item Template property DataList class 898 Repeater class 894 TemplateColumn class 908
Item Type property DataGridltem class 902 DataListltem class 897 Repeaterltem class 893
IUSR account 761, 762, 784, 786
J J#, choosing 43 Java
choosing a .NET language 43 web services 573
Join() method, String 59 JScript.NET, choosing 43
K key parameter
Insert() method, Cache object 749 keyboard shortcuts
property specifying 170 web controls 857
<Keyword> element, Advertisement file 240, 880 KeywordFilter property, AdRotator 241, 881 KnownColor enumeration 196
L Label class
enabling view state for 276 HTML elements underlying 167 members865 single-value data binding 434 web controls 864
LAN (LocalAreaNetwork) 347 language integration, CLR 14 Language parameter, WSDL.exe 624 languages
choosing a .NET language 43 evolution ofVB.NET 44 preferences 159
LastAccessTime property Directorylnfo class 508 Fileinfo class 508
LastlndexOf() method Array class 62 String class 59
LastWriteTime property Directory Info class 508 Filelnfo class 508
Launch Conditions designer 356 Length property
Filelnfo class 509 Array class 62
level attribute, <trust> 933 LicenseKey class 610 line-continuation character 591 lines, drawing 719 LinkButton class
HTML elements underlying 167 Hyperlink control compared 865 members866 web controls 865
links adding linked images 147 cookieless mode 295 how users follow a link 841
Links module, IBuySpy 829 links user control 683
Index
959
Index
960
list box HtmlSelect control850
list controls 174, 873 data binding with 441
multiple binding 443 data-bound list controls example 450 Items property 145 multiple selections 175 repeated-value data binding 440 Selectedlndex property 17 4 validation 261
ListBox class AutoPostBack property 406 data retrieval example 404 HTML elements underlying 167 list controls 875 multiple selections 175 properties 876 repeated-value data binding 440
ListControl class, 873 CheckBoxList control 876 DropDownList control875 ListBox control875 members 873 RadioButtonList control878
Listltem class 146 ListControl class 874 properties 874
Literal class Literal Control class confusion 867 members 867 web controls 866
LiteralControl class Literal class confusion 867
Load event, UserControl681 Load() method
XmlDocument class 548 XmlTransform class 560
LoadControl() method, Page class creating user control682 IBuySpy portal831
load-generating tool, stress testing 733 local Only attribute
<trace> tag 932 tracing343
Locals variable watch window 229 Location attribute, OutputCache directive 7 40 <location> tag, web.config 772 Lock() method, Application state 301 locking
performance 301 using files with web applications 502 web.config file 125
logging events see event logging
logging in/ out forms authentication 774 forms authentication settings 914
login page default 770 forms authentication 773, 768 user lists 777
Login() method, IBuySpy 810 Login.aspx page, IBuySpy 821 LoginAuthenticated event 691 LoginBox user control688 LoginFailed event 691 login Uri attribute, <forms> 914
forms authentication settings 770 logLevel attribute, <processModel> 929 Long Date data types 466 loops 66 LostFocusTextBox control 705 lstFontName control195 Luhn algorithm 257
M machine.config file
.NET languages 44 <authentication> tag 912 <authorization> tag 916 < browserCaps> tag 916 <compilation> tag 917 <customErrors> tag 919 <globalization> tag 920 <httpHandlers> tag 920, 921 <httpModules> tag 922 <httpRuntime> tag 923 <identity> tag 924 <machineKey> tag 925 <pages> tag 926 <processModel> tag 927 <security Policy> tag 930 <sessionState> tag 930 <system. web> tag heirarchy 910 <trace> tag 931 <trust> tag 932 <webServices> tag 933 ASP.NET configuration 125, 909 authenticating users 770 default authorization levels 930 default settings 920 deployment configuration 351 file format 909 location 909 restricted file types 760 structure 910 viewing44
web.config file 125, 909 Windows authentication 399 XML529
<machineKey> tag, <system. web> 925 attributes 926 view state encryption 277
MailAttachment class 524 MailMessage class 524 maintaining control state 710 managed code
using COM components 672 many-to-many relationships
using disconnected data 416 MapPath() method, ServerUtility 160 MapPoint, web services 641 Math class 54 MaxLength property
HtrnlinputFile class 847 HtrnlinputText class 849 TextBox class 873
maxRequestLength attribute, <httpRuntime> 924
maxRequestLength setting, web.config 523 MD5 algorithm 779 Me keyword
Page class current instance 145 single-value data binding 434 view state 27 4
measurements, 171 member variables
retaining using view state 278 session state example 290
members Array class 62 classes 74 DateTime class 60 instance members 75 IntelliSense 221 shared members 75, 90 static members 75 String class 53, 58 TimeSpan class 61
memoryLimit attribute, <processModel> 929 menu user control683, 685 Menu.ascx, IBuySpy 814 Merge() method, DataSet 378 <message> elements, WSDL 576 Message property, Exception 308 metacharacters 252 metadata 591 meta-language, XML 533 Method property, HtrnlForm 843 methods
brief description 57 building a .NET class 79
classes and objects 74 database component example 660 overriding render methods 702 property procedures or 668 web service proxy class 621 WebService class 587
Microsoft.NET directory 37 migration, ASP to ASP.NET 360 Millisecond property, DateTime 60 Milliseconds property, TimeSpan 61 MIME en co dings 84 7 Min function, SQL 392 rninFreeLocalRequestFreeThreads attribute
<httpRuntime> tag 924 rninFreeThreads attribute, <httpRuntime> 924 Minute property, DateTime 60 Minutes property, TimeSpan 61 mode attribute settings
<authentication> tag 913 <customErrors> tag 919 <sessionState> tag 297, 931
Mode property, HttpSessionState 290 Move() method
Directory class 504 File class 504
MoveNext() method, ADO 383 MoveTo() method
Directoryinfo class 508 Fileinfo class 508
MSDE (Microsoft data engine) 388 MSDN 124
Online Resources tab 204, 205 MSDN Class Library reference 93
Visual Studio .NET 205 MSIL (Microsoft Intermediate Language)
12,44 MultiPage controls
Internet Explorer controls 266 TabStrip control267
multiple binding, list controls 443 Multiple property, HtrnlSelect 850 multiple templates, DataList control467 multitiered design
see also three-tier design IBuySpy portal832
multitiered user access 781 munged URL 294 Mustlnherit keyword 681 My Profile tab, VS.NET 203 MyBase keyword
custom controls 702 Page events 145 subclassing controls 697
Index
961
Index
962
N name attribute
<forms> tag 914 <httpModules> 923 <trustLevel> subtag, <securityPolicy> 930 <user> tag 915 forms authentication settings 770
Name property Directorylnfo class 508 Filelnfo class 173, 508 HtmlAnchor class 841 HtmllnputControl class 840 HtrnllnputRadioButton class 848 Identity object 781
name/value collection CSS properties 839 HTML control attributes 839 HTTP headers 159 web controls 858
Namespace parameter, WSDL.exe 624 /namespace parameter 676 namespace prefixes, XML 553 Namespace property, WebService 592 namespaces
ADO.NET397 assemblies and namespaces 212 changing name 225 class library 93 classes and 92, 95 creating components 652 data names paces 376 defining94 importing 94, 117, 225 MSDN Class Library reference 93
naming conventions camel casing 909 configuration files 623 control prefixes 177 data providers 381,387, 388 data type variable prefixes 49 events 144 fully qualified name 94 IBuySpy store 809 private variables 78 using files with web applications 501 XML namespaces 554
Navigate Uri element, Advertisement flle 240,880
Navigate Uri property Hyperlink class 862 HyperLinkColumn class 907
navigation, websites 271, 683
.NET code, ADO.NET 373 component-based programming 645 error handling 306 GAC (global assembly cache) 351 mapping file types to .NET classes 921 performance counter 737 proxy class 589 web services communicating 615 XML and .NET 529
.NET class library .NET types 87 assemblies 95 brief description 10 data types 46 description 15 namespaces 93
.NET components see components
.NET Framework Array class 61 attributes 591 characteristics 16 DateTime class 59 deployment 347 description 9 exceptions 307 GDI+718 Math class 54 object-oriented programming 56, 73 reluctance to adopt 10 String class 57 TimeSpan class 59 web services 587
.NET languages 43 brief description 10 choosing between 43 common data types 46 data type variable prefixes 49 data types 46 initialization 48 installing 44 language compilation 12 structured error handling 311 third-party languages 44
.NET types classes 87 delegates 87 enumerations 87 interfaces 87
Network Neighborhood adding virtual directories to 35
NetworkCredential class 791 NetworkCredential property
Windows authentication 791
networks 34 7 DNS (Domain Name Service) 347 web service limitations 582
New keyword 77 New Project window, VS.NET 206 NewRow() method, Table 421 newsgroups 204 NextMonthText property, Calendar 882 NextPrevFormat property, Calendar 882 NextPrevStyle property, Calendar 884 nodes
manipulating XML nodes 550 XrnlDocument class 547 XmlTextReader class 543
Now property, DateTime 60, 121 No Wrap property, HtrnlTableCell853 NTLM authentication 787 null reference exception
0
common errors 305 exceptions 313
Object data type 88 object interface, HTML elements 136 object model165 object-oriented programming
.NET73 classes 73 containment 89 exceptions 307 inheritance 89 object manipulation 56 VB.NET45 Visual Basic 45
objects classes and objects 74 converting 91 instantiation 77 storing for reuse 156
ODBC data provider 37 4 Off error mode 330 OLE DB data classes 387 OLE DB data provider 37 4
alternative providers 375 OleDbCommand class
see Command class OleDbCommandBuilder class 422 OleDbConnection class
see Connection class OleDbDataAdapter class
see DataAdapter class OleDbDataReader class
see DataReader class
OleDbException class 313 On Error Goto statement 307 On error mode 330 OnDayRender() method
subclassing controls 698 Online Resources tab 202, 204 OnRowUpdated event 428 open standards, web services 574 Open() method, Connection 382, 401 OpenText() method, File 513 operations
Math class 54 variable operations 52
Operator property, CompareValidator 888 operators
comparison operators 63 conditional operators 62
optimization, CLR 14 Option Compare 225 Option Explicit 225, 918 Option Strict 225, 918 Oracle data provider 37 4, 387 Order By clause, SQL 391 OrdersXyz stored procedures, IBuySpy 804 OtherMonthDayStyle, Calendar 884 Out parameter, WSDL.exe 624 I out parameter 676 outlining, VS.NET 220 output caching 738
IBuySpy store 818 ProductList.aspx page 818 web services 608, 748
OutputCache directive 739 custom caching 7 45 fragment caching 7 4 7 IBuySpy store 816 Location attribute 740 multiple caching example 743 output caching 739 variation HttpCachePolicy class 747 VaryByHeader attribute 7 46 VaryByParam attribute 7 41
OutputCacheLocation enumeration 7 40 Overline property, Fontinfo 173 overloading 68
constructors 81 database component example 662 IntelliSense 221 WriteLine() method, Stream Writer 514
Overloads keyword 68 overriding
Render method 702, 703
Index
963
Index
964
p package folders 29 PadLeft()method,SUing58 PadRight() method, String 58 Page class 156
code-behind class 142 code-behind programming 112, 113 Controls collection 157 creating in Visual Studio .NET 217 current instance of 145 inheritance 124, 679 IsPostBack property 145 LoadControl() method 682 properties 156 web pages 123
page design, VS.NET 16 Page directive
attributes 216 Codebehind attribute 117, 217 EnableViewStateMAC atUibute 277 Inherits attribute 217 TraceMode attribute 343
Page events MyBase keyword 145
page life cycle 187 Page Load event 145
creating a simple application 107 data binding 434 data-bound list controls example 451 generating new controls 158 setting value of properties 155
Page property HtrnlControl class 154 WebControl class 170
page tracing 333 pageBaseType attribute, <pages> 927 PageCount property, DataGrid 901 PageHandlerFactory class 921 PagelndexChanged event
DataGrid control495, 902 pageOutput attribute, <trace> 343, 932 PagerStyle property,DataGrid 494, 903 pages see web pages <pages> tag, <system. web> 926 PageSize property, DataGrid 901 paging
DataGrid control494, 899 DataList control895 performance 496
Panel class HTML elements underlying 167 properties 868 web controls 867
parameters Command class 382 passing by reference 86 passing by value 86 procedures 68 using events with parameters 691
parent frame targets 241 HTML controls 841 web controls 862
Parent property Directorylnfo class 509 HtrnlControl class 154 WebControl class 170
ParenthesizePropertyName atUibute control design time support 702
Parse() method, Visual Basic 142 parsing, XML document 533, 534 Passport authentication 784
<authentication> tag setting 913, 915 password attribute
<identity> tag 925 <processModel> tag 927, 929 <User> tag 915
Password parameter, WSDL.exe 624 passwordFormat attribute, <credentials>
780,915 passwords
authentication 760 forms authentication 77 4, 779 getting hash value for 779 hashing in web.config me 779 HtrnllnputText class 848 regular expression 256
path attribute <forms> tag 914 <httpHandlers> tag 922 forms authentication settings 770
Path class creating a me browser 513
Path environment variable 116 Path parameter, WSDL.exe 624 paths
cookies 770 getting file path 160
patterns, regular expressions 252 .pdb files 349 PeakMemoryUsed property, Processlnfo 730 Pen object, graphics context 720 Percentage data type 466 performance
<processModel> tag 927 advantage of components 646 Application state 301 ASP.NET725 caching 725, 729, 738
CLR15 compilation 726 connection pooling 728 data binding 728 data retrieval 728 database profiling 728 DataReader class 383 deploying VS.NET project 350 IBuySpy store 816 indexes on database 728 locking301 maintaining state 603 paging496 performance counters 734, 736, 737 performance testing 733 proflling 725, 729 reusability of cached pages 740 scalability 725 server controls 726 session state 289, 729 state management options 302 static text 727 stored procedures 728 view state 727 view state encryption 278 web services 573
PerformanceCounter class 737 PerformanceCounterCategory class 737 permissions
ASPNET user account 40 authorization 760 creating virtual directories 26 directories 507 Windows account permissions 352
persistence cookies 286
PhysicalPath property, HttpRequest 158 Pipeline Instance Count counter 737 pixels
indicating pixel coordinates 720 measuring 720 Unit structure 171
Place class, TerraService 635 PlaceFacts class, TerraService 635 PlaceHolder class 868 platform boundaries, web services 573 platform services, VBScript 45 policyFile attribute
<trustLevel> subtag, <securityPolicy> 930 polygon, drawing and filling 719 Popularltems.ascx, IBuySpy 814 PopulateShoppingCartList(), IBuySpy 821 portals see web portals <portT'ype> elements, WSDL 577
postback automatic postback 184, 197 cached page running events 7 44 capturing a change event 184 creating a fll.e browser 513 disabling view state 727 events not ideal for 184 HTML controls 183 IsPostBack property 145 page validation on 259 workings ofPostBack events 186
postbacks 714 doPostBack() function 714 GetPostBackEventReference() method
714,715 RaisePostBackEvent() method 715 view state 274 web controls 714
PostedFile property, HtmllnputFile 521, 847 PowerUser role 789 precompilation 115
code-behind fll.es 113, 212 PrevMonthText property, Calendar 882 primary interop assembly 673, 67 4 PrintOperator role, 789 private assemblies 350 private keys, SSL 767 Private keyword 76, 600 private variables 76, 78 procedures 67
delegates 69 parameters 68
process model 730 ProcessiD property, Processlnfo 730 Processlnfo class
monitoring processes 731 properties 730 retrieving 730
<processModel> tag <system. web> tag 927 attributes 928 specifying account to run code 924
ProcessModellnfo class GetProcessHistory() method 730 GetProcesslnfo() method 730 liS 6 process model 730 profiling performance 730
ProcessModelReport.aspxpage 731 Processor performance counter 736 ProductDetails.aspx page, IBuySpy 818 ProductList.aspx page, IBuySpy 818 ProductsList.aspx page, IBuySpy 816 ProductXyz stored procedures, IBuySpy 805 profiling 725, 728, 729 programmatic impersonation 794
Index
965
Index
966
programming <defaultLanguage> tag 918 client-side programming 6 component-based programming 645 server-side programming 6
Project files, VS.NET 207 project settings
Common Properties 224 Configuration Properties 224
projects Build property 225 Designer Defaults property page 225 General property 225 Imports property 225 properties 225 settings, Visual Studio .NET 224 starting in Visual Studio .NET 202
properties attributes and properties 154, 155 brief description 57 building a .NET class 78 classes and objects 73 database component example 660 get procedure 78 HTML controls 839 projects 225 property procedures 78 set procedure 78 setting using simple data binding 437 setting value of 155 stateful or stateless design 656
Properties Valid property, BaseValidator 887 Property Builder window, DataGrid 4 78 property procedures, 668, 685 Protected keyword 76
ASP.NET controls 111 protection attribute, <forms> 914
forms authentication settings 770 Protocol parameter, WSDL.exe 624 proxy class, web service
constructor 622 CookieContainer property 629 creating proxy with WSDL.exe 624 creating web reference 616 methods 621 RCW672 SOAP headers 632 state management 627 StockQuote proxy class 621 TerraService web service 634 using 625 web service 589, 619 web services communicating 581, 615, 626
Public keyword 76 public member variables 290
public methods 651 pubs database 388, 390
Q Query Analyzer, SQL 389, 394 query string parameter
caching multiple page versions 741 multiple caching example 743 reusability of cached pages 740
query strings advantages and limitations 281 data types 302 example282 lifetime 302 passing information using 281 performance 302 scope 302 security 302 state management options 302 storage location 302
QueryString collection 339 QueryString property, HttpRequest 159 question mark (?) wildcard 771 QuickLinks module, IBuySpy 829
R /r parameter 653 RadioButton class
HTML elements underlying 167 HtmllnputRadioButton class 847 members 869 web controls 868
RadioButtonList class HTML elements underlying 167 list controls 878 multiple selections 175 properties 879 repeated-value data binding 440
RaiseEvent statement 714 RaisePostBackEvent() method 715 RangeValidator class 243
added members 245 Display property 248 example web form 258 properties 888 validation controls 888 validation example 246
RCW (runtime callable wrapper) adding COM reference 674 creating in VS.NET 674 importing type libraries 676 primary interop assembly 673
proxy class 672 Type Library Importer utility 673, 676 using COM components 672
Read() method DataReader class 382, 403, 405 XmlTextReader class 539
Readlnt32{) method 516 ReadLine{) method, StreamReader 514 readOnly attribute, <pages> 926 ReadOnly property, BoundColumn 904 ReadString{) method 516 ReadXml{) method, DataSet 378 Recordset
database access, ADO 370, 383, 384 disconnected Recordset 384
rectangle, drawing and filling 719 ReDim keyword, arrays 50 redirect attribute, <error> 920 Redirect{) method
HttpResponse class 160 Response class 282
RedirectFromLoginPage{) method FormsAuthentication class 774, 775, 776
redirectUrl attribute Passport authentication 915
/reference parameter 676 reference types 85
data type behavior 88 references, adding
custom component reference 654 Imports statement compared 212
Refresh{) method Directorylnfo class 508 Filelnfo class 508
Region object, filling 719 Register directive
consuming custom controls 696 creating a user control681
Register.aspx page, IBuySpy 809, 822 registering components 103 Registry designer 356 regular expressions 252
common examples 256 credit card numbers 257 literals 252 Luhn algorithm 257 metacharacters 252 regular expression characters 255 testing254
RegularExpressionValidator class 243 added members 245 example web form 258 properties 889 validation controls 889
RejectChanges{) method, DataSet 378
relational databases auto increment column 394, 395 DataRelation objects 379 identity column 394 many-to-many relationships 416 overview 366 table relationships 366
RemoteOnly error mode 330 <remove> subtag, <httpHandlers> 922 <remove> subtag, <httpModules> 923 Remove() method
DataSet class 421 String class 58
rendering HTML controls 839 RenderContents() method, WebControl708 RenderUplevel property, BaseValidator 887 RenderXyx() methods
implementing custom methods 707 overriding in custom controls 702, 703 rendering for browsers 708
RepeatColumns property CheckBoxList class 877 DataList class 896 RadioButtonList class 879
RepeatDirection property CheckBoxList class 877 DataList class 896 RadioButtonList class 879
repeated-value data binding 440 .aspx file type 441 data binding 432 list controls 440 setting control properties 432
Repeater class 892 BaseDataList class inheritance 891 comparing template controls 4 79 data control styles 481 data control templates 481 example479 formatting 4 79 members893 repeated-value data binding 440 templates 894
Repeaterltem class properties 893
RepeatLayout property CheckBoxList class 877 DataList class 896 RadioButtonList class 879
RepeatTimes property web control inheritance 707
Replace() method, String 57, 58 Replicator role 789 request details
tracing337
Index
967
Index
968
Request object Cookies collection 286 single-value data binding 435
Request property, Page 157 RequestCount property, Processlnfo 730 requestLimit attribute
<processModel> tag 929 <trace> tag 932 tracing343
requestQueueLimit attribute <processModel> tag 929
requests Requests counters 736 setting maximum queue 924
RequiredFieldValidator class 243 added members 245 example web form 257 properties 889 validation controls 889
resources 202, 204 Response object
Cookies collection 286 HttpApplication class 123
Response property HttpResponse class 124 Page class 157
<result> subtag, <browserCaps> 917 .resx files
ASP.NET applications 101 deploying VS.NET project 349
Reverse() method, Array 62 ReviewsXyz stored procedures, IBuySpy 805 rich controls 233, 261, 879 roles
<alloW> and <deny> rules 916 associating user with role 782 default Windows roles 789 forms authentication 781 IslnRole() method 781 testing role-based security 783
root namespace 652 Root property, Directorylnfo 509 row state 423 Rows collection
Add() method 421 creating table programmatically 871 DataRow class 415 modifying disconnected data 421
Rows property HtrnlTable class 852 HtmlTextArea class 855 ListBox class 876 Table class 870 TextBox class 873
RowSpan property HtmlTableCell class 853 TableCell class 871
RowUpdated event, DataAdapter 426 run scripts permission 27 Run To Cursor command 228 runat="server" attribute 106, 136, 144, 167,
216,839
s Save() method, XmlDocument 547 scalability 725
CGI applications 6 database access 369 IBuySpy store 803 ISAPI 6 performance 725 session state 293 state management 603 using files with web applications 502
schema XML validation 555 XSD documents 554
scope displaying variables in scope 229 state management options 302
script block 106 scripting, ASP limitations 9 SDK version, IBuySpy 800 search engines 366 Second property, DateTime 60 Seconds property, TimeSpan 61 security
<http Modules> tag 922 <trust> tag 932 ASP.NET and liS interaction 761, 762 ASP.NET Security Model 760 authentication 760 authorization 760 certificates demonstrating 764 checking secure connection 766 ClientCertificate property 158 client-side programming 7 component-based programming 646 configuration 910 deployment configuration 352 determining requirements 759 directory permissions 507 directory security settings 785 Event Logs 324 Filelnfo creating a file list 507 forms authentication 768 IBuySpy store 811, 823
impersonation 760 intranet 762 query strings 281 restricted file types 760 SOAP headers 611 SSL (Secure Sockets Layer) 613 state management options 302 testing for SSL connection 767 using files with web applications 502 view state 277 web services 573, 609 Windows authentication 784 Windows event logs 320
security cookies anonymous users 771 encryption 770 settings 768 unique naming 770
<securityPolicy> tag <system. web> tag 930 <trust> tag relationship 930 <trustLevel> subtag 930
Seek() method 516 Select statement, SQL 390
From clause 391 Order By clause 391 retrieving data 391, 401 SQL basic concepts 389 Top clause 391 Where clause 391,392
<select> tag HtrnlSelect class 139, 849 related control classes 167
Select() method, DataTable 378 SelectCommand property, DataAdapter 383 Selected property, Listltem 87 4 SelectedDate property, Calendar 233, 883 SelectedDates property, Calendar 883 SelectedDayStyle property, Calendar 884 Selectedlndex property
DataGrid class 901 DataList class 896 HtrnlSelect class 850 IBuySpy store 815 list controls 17 4 ListControl class 874 template controls 485
SelectedlndexChanged event BaseDataList class 892 ListControl class 874 template controls 482 web controls providing 184
Selectedlndices property, HtrnlSelect 850 Selectedltem class
binding, DataValueField property 447
Selectedltem property DataGrid class 901 DataList class 896 ListControl class 874
SelectedltemStyle property DataGrid class 903 DataList class 898
SelectedltemTemplate property, DataList 898 SelectedNodelndex property, Tree View 271 SelectedValue property, HtrnlSelect 850 SelectionChanged event
Calendar class 883 Calendar Day class 238
SelectionMode property Calendar class 234, 883 ListBox class 876 multiple selections 175
SelectMonthText property, Calendar 883 SelectorStyle property, Calendar 884 SelectWeekText property, Calendar 883 self frame targets 241
HTML controls 841 web controls 862
Send() method, SmtpMail524 Sender As Object parameter 143, 691 SeparatorStyle property, DataList 898 SeparatorTemplate property
DataList class 898 Repeater class 894
Serializable attribute 280 serialization
storing objects in view state 280 server controls
configuring HTML elements as 216 creating a simple application 106 HTML controls compared 165 necessity of 727 performance 726 static elements 727 view state 727
Server object 602 Server property, Page 157 server variables, tracing 340 ServerChange event 152
HTML controls 152, 183 HtmllnputCheckBox class 846 HtmllnputRadioButton class 848 HtrnllnputText class 849 HtrnlSelect class 851 HtrnlTextArea class 855
ServerClick event 151 HTML controls 152, 183 HtrnlAnchor class 841 HtrnlButton class 842 HtmllnputButton class 140, 845
Index
969
Index
970
server-side caching client side caching compared 7 40
server-side programming ASP.NET 7 evolution of 6
Server Utility class 160 ServerValidate event, CustomValidator 259, 890 ServerVariables property, HttpRequest 159 <service> element, WSDL 579 service providers 589 session cookies 627 session keys 767 Session object 602 Session property, Page 156 session state 288
<httpModules> tag 922 <sessionState> tag, web.config 294 accessing in web services 589 caching for scalability 293 configuration 294, 930 cookies 288 data types 303 disabling session management 603 enableSessionState attribute 926 example 290 IBuySpy store 803, 811 lifetime 303 losing session state 289 management with web service 632 performance 289, 303, 729 read Only attribute 926 running ASP.NET with ASP 361 scalability 293 scope 303 security 303 session tracking 288 state management options 303 storage location 303 tracing338 using proxy class 629 Web Method attribute enabling 603, 605
Session_OnEnd event 123 Session_OnStart event 123 SessioniD property, HttpSessionState 290 <sessionState> tag
<system. web> tag 930 attributes 931 web.config file 294
Set Next Statement command 228 set procedure 78 SetAttributes() method, File 504 SetAuthCookie() method,
FormsAuthentication 77 4 SetCacheability() method, HttpCachePolicy746
SetCurrentDirectory() method, Directory 504 SetExpires() method, HttpCachePolicy 7 46 setup designers 355 SHA1 algorithm 779 shared assemblies 351 shared members 75, 90 ShoppingCart.aspx pages, IBuySpy 820 ShoppingCartDB() function, IBuySpy 819 ShoppingCartXyz sprocs, IBuySpy 805 Short Date data type 466 shorthand assignment operators 53 Show Next Statement command 228 ShowDayHeader property, Calendar 883 ShowDirectoriesin() subroutine 513 ShowFilesin() subroutine 513 ShowFooter property
DataGrid class 901 DataList class 896
ShowGridLines property, Calendar 883 ShowHeader property
DataGrid class 901 DataList class 896
ShowMessageBox property ValidationSummary class 891
ShowNextPrevMonth property, Calendar 883 ShowSummary property
ValidationSummary class 891 ShowTitle property, Calendar 883 ShutdownReason property, Processlnfo 730 shutDown Timeout attribute
<processModel> tag 929 side by side execution, CLR 15 signatures 68, 69 Sign-In module, IBuySpy 829, 831 SignOut() method, FormsAuthentication 774 simple data binding
see single-value data binding single data type 88 single step debugging 226 single-value data binding
data binding 432 example433 how it works 433 inserting value 432 problems using 438 setting properties 437 using code instead 439
Size property Fontinfo class 173 HtrnlinputFile class 847 HtrnlinputText class 849 HtrnlSelect class 850
slidingExpiration parameter Insert() method, Cache object 749
.sln files ASP.NET applications 101 deploying VS.NET project 349
SmtpMail class Send() method 524
SOAP580 body580 envelope 580 example of SOAP message 580 HTTP GET/POST compared 581 toolkit 575 using web service without proxy class 625 web service communications 581 web service proxy class 621 web service standards 574 web services 574, 587 web services testing 597
SOAP headers proxy class 632 web services security 611
social security number regular expression 256
Solution Explorer Assemblylnfo.vb 208 code-behind files 218 Visual Studio .NET 208
Sort() method, Array 62 SortCommand event, DataGrid 497, 902 SortExpression property
Data Grid class 497 DataGridColumn class 903
sorting DataGrid control899 DataList control 895
sorting data bound data 498 DataGrid control496, 498 DataList control498 Data View object 498
Source property, Exception 308 <span> element 167 special characters, HTML 162 Split() method, String 59 sprocs see stored procedures SQL (Structured Query Language)
basic concepts 388 experimental learning 389 online tutorials 390 Order By clause 391 Query Analyzer 389, 394
SQLServer authentication 399 data provider 37 4, 387 Enterprise Manager 367 obtaining sample database 388
SQL statements 388, 390, 396 adding special variable 129 aggregate functions 392 Avg function 392 Command class 382, 402 Count function 392 data retrieval example 404 DISTINCT keyword 392 Insert statement 394 Min function 392 Select statement 390 Sum function 392 Update statement 393, 394
SqlCommand class see Command class
SqlCommandBuilder object updating disconnected data 422
SqlConnection class see Connection class
sqlConnectionString attribute <sessionState> tag 299, 931
SqlDataAdapter class see DataAdapter class
SqlDataReader class see DataReader class
Src attribute 680 Src directive 681 Src property, Htmllmage 844 SSL (Secure Sockets Layer) 766
certificates demonstrating security 764 how it works 767 testing for SSL connection 767 web services security 613
StackTrace property, Exception 308 standards, .NET Framework 16 Starts With() method, String 58 StartTime property, Processlnfo 730 state
Application state 300 ASP limitations 9 database access 369 disconnected access 273 File/Filelnfo classes 657 holding state information 156 HTML server controls 136 HTTP369 maintaining control state 710 no maintaining state 156 performance 603 running ASP.NET with ASP 361 sharing between ASP and ASP.NET 102 stateful Account class example 657 stateful or stateless design 656 stateless AccountUtility class 658
Index
971
Index
972
view state 137,274 data binding and 444
web service communication limitations 582 web service transactions 605
state management 273 ASP and ASP. NET 27 4 configuration 910 data caching replacing 725 disabling in controls 154, 170 options compared 302 proxy class 627 scalability 603 session cookies 627 session state 288 StockQuote web service 603 web services 602, 632
stateConnectionString attribute <sessionState> tag 297, 931
static elements, server controls 727 static members 75, 90 static text 727 StaticObjects property, HttpSessionState 290 Status property, Processlnfo 730 statusCode attribute, <error> 920 Step Into/Out/Over commands 227 StockQuote web service 588
code explained 588 code-behind files 590 configuring web service client 615 proxy class 619, 621 state management 603 StockQuote class 621 using proxy class 625 web service data types 598
stored procedures Command class 382 databases 659 IBuySpy store 804 performance 728
StreamReader class 513, 514 Stream Writer class 513, 514 stress testing 732 strict attribute, <compilation> 918 /strictrefparameter 676 Strikeout property, Fontinfo 173 String class 57
assignment operations 88 equality operations 88 members 53,58 methods 57
String data type 88 strings, encoding and decoding 160, 162 strong typing, VB.NET 45
structured error handling .NET languages 311 error handling 307 exception handling 315 Try ... Catch ... Finally block 311
Style property HtmlControl class 154, 839 WebControl class 858
styles building HTML styles 216 CSS (cascading style sheet) 149 DataGrid control902 DataList control898 template control481
stylesheets, XSL transformations 559 Sub keyword 67 subclassing
controls 697 text box with a title 703
subdirectories, accessing 29 subroutines 67
web services 589 Substring() method, String 57, 58 Subtract() method, DateTime 60 Subtract() method, TimeSpan 61 Sum function, SQL 392 .suo files 101 System log 320 System performance counter 737 System.Data namespaces 376 System.Diagnostics namespace 322, 737 <system. diagnostics> tag,
machine.config file structure 910 System.Drawing namespace 718 System.IO namespace 502, 503 <system.net> tag, machine.config 910 <system.remoting> tag, machine.config 910 System.Security.Cryptography namespace
encryption 781 <system. web> tag, web.config 126
configuration file structure 910 elements 910 heirarchical structure 910
System.Web.Services namespace 587 System.Web.UI namespace 679 System Operator role 789
T It parameter 653 Tablndex property, WebControl170, 858 Table class 177
see also HtmlTable class HTML elements underlying 167
modifying disconnected data 421 NewRow() method 421 properties 870 TableCell objects 869 TableRow objects 869, 870 web controls 869
<table> tag HtmlTable class 139, 851 related control classes 167
TableCell class HTML elements underlying 167 properties 871 Table controls 178, 869
TableltemStyle class, Calendar 884 TablePage class 180 TableRow class
HTML elements underlying 167 properties 871 Table controls 177, 869
tables creating 871 displaying values in 432 relational databases 366
TabStrip control, IE 266 Tag prefixes 681 TagName property
HtmlControl class 154, 839 HtmlGenericControl class 843
tags adding controls 140 HTML3 HTML and XML 532 HTML controls 839, 840 HTML server control classes 138 interpreting special characters 161 modifying programmatically 843 validator controls 258 web control tags 167 Xml documents 54 7
Target property AdRotator class 881 HtmlAnchor class 841 Hyperlink class 862 HyperLinkColumn class 907
TargetSite property, Exception 308 tblimp.exe, RCW 673 <td> element 167 tempDirectory attribute, <compilation> 918 template controls 457
ASP.NET controls 464 binding a data source 460 comparing 472 creating 458 CType() function 488 data binding 457
with multiple templates 467
DataGrid control475 displaying many rows 494 editing items 486 selecting items 482 sorting with 496
DataList control472 adding to 458 editing items 490 selecting items 483 sorting with 498
definition file 458 editing items 481, 485 FindControl() method 488 HTML blocks 457, 462 Repeater control4 79 SelectedlndexChanged event 482 selecting items 481, 482
template styles 468 TemplateColurnn class 907, 908
DataGrid control476 templates
data controls 891 DataGrid control899 DataList control897, 898 Repeater control894 splitting HTML across templates 892
TerraService 633 testing
advantage of components 646 Cache object 750 disabling caching while testing 7 40 performance testing 733 stress testing 732 web service caching 608 web services testing 592
text <AlternateText> element 240, 880 drawing custom text, GDI+ 721 HtrnllnputText class 848 retaining text in web page 158 without HTML 866
text files reading and writing flat files 513
Text module, IBuySpy 829 Text property
Button class 860 Button Column class 905 CheckBox class 861 Hyperlink class 862 HyperLinkColumn class 907 LinkButton class 866 Listltem class 874 Literal class 867 RadioButton class 869 TextBox class 873
Index
973
Index
TextAlign property ToString() method CheckBox class 861 DateTime class 60 CheckBoxList class 877 object manipulation 56 Label class 865 TimeSpan class 61 RadioButton class 869 Totalxyz properties, TimeSpan 61 RadioButtonList class 879 To Upper() method, String 57, 58
<textarea> tag, HtrnlTextArea 139, 854 <tr> element 167 see also HtmlTextArea class trace information 340 TextBox class 872 Trace object
TextBox class TraceMode property 343 HTML elements underlying 167 Warn() method 340 properties 168 Write() method 340 web controls 872 <trace> tag
TextChanged event, TextBox 184, 873 <system. web> tag 931 TextMode property, TextBox 168, 873 attributes 932 <th> element 167 TraceMode attribute, Page directive 343 Thawte certificate authority 764 traceMode attribute thin clients 7 <trace> tag 932 threads tracing343
Cache object 748 TraceMode property, Trace 343 data caching 7 48 tracing settings 924 application state 338
three- tier design application-level tracing 343 ASP.NET components 647 attributes 343 encapsulation 649 configuration 910, 931 IBuySpy store 799, 806 control tree 337 multi tiered design 832 cookies collection 338
TileiD, TerraService 638 debugging 333 Time data types 466 enabling tracing 333 timeout924 forms collection 339 timeout attribute headers collection 339
<forms> tag 914 page tracing 333 <processModeb tag 928 QueryString collection 339 <sessionState> tag 296, 931 request details 337 forms authentication settings 770 server variables 340
Timeout property session state 338 HttpSessionState class 290 trace information 337 using proxy class 626 tracing information 335
TimeSpan class 59 web.config file 343 members61 TransactionOption property,
TimeSpan data type 88 Web Method attribute 606 TitledTextBox control 704 transactions TitleFormat property, Calendar 883 IBuySpy store 804, 825 TitleStyle property, Calendar 884 web services 605 Today property, DateTime 60 Transfer() method, ServerUtility 161 TodayDayStyle property, Calendar 884 transferring files TodaysDate property, Calendar 883 Copy Project feature 354 ToLower() method, String 58 web setup projects 356 Toolbar control, IE 264 Transform property, Xml886 toolbox, custom controls 700 Transform() method, XmlTransform 560 ToolTip property, WebControl170, 858 transformations 161 Top clause, SQL 391 TransformSource property, Xml886 top frame targets 241 Tree View control
HTML controls 841 Add() method 269 web controls 862 Internet Explorer controls 268
SelectedNodeindex property 271 974
Trim() method, String 57, 58 TrimEnd() method, String 513 trust boundaries 573 <trust> tag
<identity> tag relationship 925 <security Policy> tag relationship 930 <system. web> tag 932 attributes 933
<trustLevel> subtag, <securityPolicy> 930 Try ... Catch ... Finally block
data retrieval example 405 database connections 397 exception handling example 314 exceptions 311, 312 flle access example 521 structured error handling 311 structured exception handling 315 verifying database connection 400
type attribute <httpHandlers> tag 922 <httpModules> tag 923
type conversions 55,274 Type Library Importer utility 673, 676 Type property
CompareValidator class 888 HtmllnputButton class 845 HtmllnputCheckBox class 846 HtmllnputControl class 156, 840 HtmllnputFile class 847 HtmllnputHidden class 847 HtmllnputRadioButton class 848 HtmllnputText class 849 RangeValidator class 888
TypeConverter class 196 types
.NET types 87 data types 46, 88 exceptions based on 307 object and type behaviors 88 reference types 85 value types 85
<types> element, WSDL 576 typing, VBScript 45
u UDDI 583, 584
web service standards 574 Underline property, Fontinfo 173 unhandled exceptions
<customErrors> tag 919 Unit structure 171 UnitType enumeration 171
Unlock() method, Application state 301 Update statement, SQL 393
example 407, 409 SQL basic concepts 389 SQL Query Analyzer 394
Update() method DataAdapter class 383, 422, 423 disconnected Recordset, ADO 384
UpdateBatch() method disconnected Recordset, ADO 384
UpdateCommand event DataGrid control488, 901 DataList control493, 897
UpdateCommand property, DataAdapter 383 UpdateText property
EditCommandColumn class 906 updating data 407
AD0384 concurrency 426 conflicts 423 DataAdapter class 384, 422 example424 modifying disconnected data 420
uploading flies 521, 523 URI (Universal Resource Identifier)
XML namespaces 553 URL (Universal Resource Locator)
addresses 592 dynamic web service URLs 622 encoding 157 HtmlAnchor control destination 841 Hyperlink control destination 862 loginUrl attribute 770 munged URL 294 query string parameter 281 redirects 924 requested page URL 774 session tracking 289 URL Behavior 622 WSDL.exe parameters 624
Url property, HttpRequest 159 UrlDecodeO method, ServerUtility 160 UrlEncode() method, ServerUtility 160, 162 UrlReferrer property, HttpRequest 159 <use> subtag, <browserCaps> 917 useFullyQualifiedRedirectUrl attribute
<httpRuntime> tag 924 User accounts 789 user authentication 157
security concept 760 storing user information 778 using events with parameters 691
user authorization 760
Index
975
Index
976
user controls 679 .ascx files 679 Menu.ascx, IBuySpy store 814 configuration through properties 685 creating 680 creating dynamically 682 custom user control based on text box 695 design time VS.NET 683 directive 679 events 688 file extension 679 independent user controls 683 inserting control tag 681 integrated user controls 685 interactive controls 685 limitations 693 non interactive controls 683 requesting 679 using events with parameters 691 web pages compared 679
user impersonation 760 user interface
code-behind files 119 code-behind files distinction 438 IBuySpy portal827 three-tier design 647 validating input 242 web controls advantage 165
User Interface designer 356 user lists 777 User object 602 User property, Page 157 User role 789 <user> tag, <credentials> 915 UserAgent property, HttpRequest 159 UserControl class 679 userControlBaseType attribute, <pages> 927 UserHostAddress property, HttpRequest 159 UserHostName property, HttpRequest 159 User Languages property, HttpRequest 159 userName attribute
<identity> tag 925 <processModel> tag 927, 928, 929
Username parameter, WSDL.exe 624 users
see also anonymous users <alloW> and <deny> rules 916 associating user with role 782 authorizating access for 773 different levels of user 781 multitiered access 781 storing user information 778
v Val method, Visual Basic 142 validate attribute, <httpHandlers> 922 validation 242
see also Causes Validation property automatic validation 244 client-side validation 244 ControlToValidate property 254, 887 example246 forms authentication settings 914 list controls 261 manual validation 250 process explianed 244 security cookies 770 typical user errors 242 validated form 257 validation controls 243 web services 576 when button is clicked 842, 845 XML document validation 555
validation attribute, <machineKey> 926 validation control classes 244 validation controls 886
CompareValidator control887 Custom Validator control889 Range Valida tor control888 RegularExpression Validator control889 RequiredFieldValidator control889 ValidationSummary control890
ValidationEventHandlerevent556 ValidationExpression property
RegularExpressionValidator class 889 validationKey attribute, <machineKey> 926 ValidationSummary class 249
properties 891 validation controls 890
validator controls control classes 243 event handling 258 tags 258
VAlign property HtrnlTableCell class 853 HtrnlTableRow class 852
Value property HtrnllnputButton class 845 HtrnllnputControl class 156, 840 HtmlinputHidden class 847 HtrnllnputText class 849 HtrnlTextArea class 855 Listitem class 874
value types 85, 88 values
displaying in tables 432 enumerations 51
ValueToCompare property CompareValidator class 888
variable watch windows, VS.NET 229 variables
adding special variable 129 arrays 49 data type prefixes 49 displaying important variables 229 displaying variables added 229 displaying variables in scope 229 operations on variables 52 shorthand assignment operators 53
VaryByHeader attribute OutputCache directive 746
VaryByParam attribute cached page running events 7 44 caching multiple page versions 741, 742 IBuySpy store 816 multiple caching example 743 OutputCache directive 739 reusability of cached pages 741 specifying parameters 742
.vb rues ASP. NET applications 101 code-behind programming 110 creating components 650 deploying VS.NET project 349
VB.NET accessibility keywords 76 arrays 49 choosing between languages 43 enhancements on VB 45 enumerations 51 initialization 48 shorthand assignment operators 53 type conversion 55 variable operations 52 why it evolved 44
vbc.exe utility 113 .vbproj flies 101 VBScript44 verb attribute, <httpHandlers> 922 verbs
<alloW> and <deny> rules 916 Verisign certificate authority 764 VerticalAlign property
TableCell class 871 TableitemStyle class 884 TableRow class 871
view state 137,274 cached page running events 745 data binding and 444 data types 302 disabling 727 enableViewState attribute 926
encoding 925 encryption 277, 278 example275 lifetime 302 limitations 281 maintaining control state 710 performance 278, 302, 727 postbacks 274 retaining member variables 278 retrieving values 27 4 scope 302 security 277, 302 state management options 302 storage location 302 storing custom objects 280 testing710 view state collection 274 what it does 276
ViewState property 276 virtual directories
see also liS accessing subdirectories 29 adding to Network Neighborhood 35 configuring with liS 29 creating25 creating a simple application 104 Custom Errors tab 32 debugging errors, VS.NET 231 document tab 31 file mappings 33 getting 158 managing with liS 28 removing 126 sharing between ASP and ASP.NET 102 transferring flies 356 transferring VS.NET projects 350 Virtual Directory tab 30 Visual Studio .NET 206 web folders and icons 28 web services 589 web.config me 126 website management 25
visibility, web controls 858 Visible property
DataGridColumn class 903 HtmlControl class 154, 839 WebControl class 170, 858
VisibleDate property, Calendar 883 VisibleMonthChanged event
Calendar class 883 Calendar Day class 238
Visual Basic advantages over VBScript 45 evolution ofVB.NET 44
Index
977
Index
978
Visual Basic .NET migration to .NET 12 VB6 compatibility 12
Visual Basic 6 data type changes 48
Visual Studio .NET 201 .aspx.vb file type 217 access control rule default 770 additional features, using 212 application, starting 206 assembly reference, adding 211 benefits 201 Breakpoints window 228 brief description 10 code-behind flles 117, 217 code-behind programming 217 components, creating 650 configuration 203 controls, configuring 214 custom controls 699 data controls, auto format for 470 data binding, caution when 436 debugging 225, 230, 334, 666 deploying using VS.NET 352 deploying VS.NET project 349 deploying web applications 350 description 16 directory 38 DOCUMENT object, configuring 216 event handlers, adding 219 flles 210, 211 flow/grid layout modes 336 FlowLayout page 213 GridLayout page 213 Handles keyword 217 IBuySpy Case Studies 800 IntelliSense 220, 221 MSDN Class Library reference 205 My Profile tab 203 New Project window 206 Online Resources tab 202, 204 outlining 220 Page class, creating 217 project and solution flles 207, 208 project settings 224 Projects tab 202 projects, starting 202 projects, transferring 350 proxy class 619 RCW, creating 674 Solution Explorer window 208 user control at design time 683 variable watch windows 229 virtual directories 206 web controls, adding 214
Web Form designer 214 web pages, designing 213 web reference, creating 616 web service client, configuring 615 web services, consuming 615 Windows authentication default 787 writing code 217 user control, creating 680 XSD, creating 558
vsdisco files ASP.NET applications 101 deployingVS.NET project 349
w WAN (Wide Area Network) 34 7 Warn() method, Trace 340 WAST (Web Service Applications Stress Tool)
performance counters 734 stress testing 733
Watch variable watch window 229 web applications 99
code-behind programming 110 configuration changes 103 configuration settings 127 creating a simple application 104 data driven applications 365 directives 110 updating 103
web browsers see browsers web controls 136, 165, 857
adding, Visual Studio .NET 214 AdRotator control239 advantages 165 AutoPostBack property 184, 186 Calendar control233 classes 166, 169 combining 693 control containing 170 creating 706 doPostBack() function 186 events 184 HTML controls compared 165, 857 HTML elements underlying 167 HTML tags compared 839 inheriting from base class 706 modifying 693 postbacks 714 properties common across controls 857 rich controls 233 tags 167, 168 user control events 688 visibility 170
web development, evolution of 3
web farms 300, 726 web folders 28, 29 Web Form designer, VS.NET 214 web forms 133
coding 119 deriving web forms 927 designing, VS.NET 201 events 140 HtrnlForm class 138 inheritance 112 validated form 257
web hosting MSDN online library 206 private assemblies 350
Web Matrix 232 web pages
addresses 159 ASP drawbacks 9 ASP.NET applications 99 buffering server output 160 caching 160 caching multiple page versions 741, 744 combining layout modes 213 controls, adding 140 creating a simple application 104 designing, Visual Studio .NET 213 dynamic web pages 6 e-card applet 190 embedding dynamic graphics 722 files in Visual Studio .NET 211 headers and footers 682 IBuySpy store 812 images, placing inside 722 inheritance 156 isolation from database 649 life cycle 187 order of events in processing 183 OutputCache directive 745 Page class 123 Page property 154 precompilation 102 reference to 170 resubmit or first time run 157 simplifying code structure 646 transferring execution to another 161 transferring information between 159 transferring user to another 160 updating 103 user controls 679, 683, 685 XML, displaying 885
web portals data driven ASP. NET applications 366 IBuySpyportal797, 827
web reference creating in VS.NET 616 TerraService web service 633
web server copying .asmx file to 589 flle browser 510 Microsoft recommendation 726 multiple server hosting 726
web server controls see web controls Web Service Discovery (DISCO) 583 web services
.asmx file type 587
.NET Framework 587 application development 615 architecture 571 ASP.NET test page 592 business objects comparison 589 caching608 classes 587 client data exchange 576 client, configuring 615 code-behind files 590 communicating with .NET applications 615 communication limitations 582 components compared 650 cross-platform compatibility 598 current situation 585 data caching 755 data type conversion 587 data types 597 deploying 590 description 591 documenting 590 dynamic web service URLs 622 forms authentication 793 function visibility 600 future ideas 585 GotDotNet 641 how they work 587 HTTP transmission 587 IBuySpy store 810 liS (Internet Information Services) 573 inheritance 589 Integrated Windows authentication 791 integrated XML 530 internet applications 572 MapPoint 641 methods 595, 596 MSDN online library 206 open standards 574 output caching 748 performance 573 proxy class 589, 619
methods621 using without 625
Index
979
Index
980
security 573, 609 self description 590 service providers 589 session state management 632 session state, accessing 589 SOAP 574, 581 state management 602 StockQuote web service 588 System.Web.Services namespace 587 TerraService 633 testing 592 transactions 605 UDDI584 using a real web service 633 validation 576 virtual directories 589 web methods, accessing 588 web reference, creating 616 web service methods 587 web service standards 574 Web Service class code 587 when to use 573 Windows authentication 790, 792 Windows clients 639 WSDL574
using without WSDL.exe 625 WSDL communications 581
XMethods 641 XML namespace, specifying 592
web setup projects deploying using VS.NET 352, 354 designers 355 transferring files 356
web.config file <add> tag 129 <appSettings> tag 128 <authentication> tag 768, 912 <authorization> tag 770, 916 <browserCaps> tag 916 <compilation> tag 917 <configuration> tag 126 <customErrors> tag 919 <globalization> tag 920 <httpHandlers> tag 920 <httpModules> tag 922 <httpRuntime> tag 923 <identity> tag 793, 924 <machineKey> tag 925 <pages> tag 926 <processModel> tag 927 <securityPolicy> tag 930 <sessionState> tag 294, 930 <system.web> tag 126, 910 <trace> tag 931
<trust> tag 932 <webServices> tag 933 advantages 125 ASP.NET applications 101 authenticating users 770 configuration 125, 909 connection string not found 666 custom error pages 331 custom settings 128 database component example 662 database constants, storing 645 debugging errors, VS.NET 231 deployment 349 directories, accessing 771 dynamic web service URLs 622 file format 909 flles, accessing 772 forms authentication 768 IBuySpy store 810 machine.config file 125, 909 maximum size of file uploads 523 modifying error modes 330 passwords, storing 779 question mark wildcard 771 session state configuration 294 subdirectory inheritance 127 tracing343 updating with hashed values 780 user information, storing 778 VS.NET access control rule default 770 Windows authentication settings 787 XML 126,529
Web.Services namespace 587 WebControl class 169, 170
Button class 860 CheckBox class 861 formatting for repeating control 708 Hyperlink class 861 Image class 862 ImageButton class 863 inheriting from 706 Label class 864 LinkButton class 865 Literal class 866 Panel class 867 PlaceHolder class 868 RadioButton class 868 RenderContents() method 708 Table class 869 TextBox class 872
WebControls namespace 169 BaseValidator class 245 validation control classes 244
.webinfo files 349
WebMethod attribute CacheDuration property 608 EnableSession property 603 enabling session state 603, 605 example using 588 inheritance from WebService class 589 StockQuote web service 588 Transaction Option property 606 web service description 591 web service function visibility 600 WebService class 587
WebProxy class 627 WebService attribute 591,592 WebService class 587
inheritance from 588, 589 intrinsic objects 602 methods 587 StockQuote web service 588 Web Method attribute 587
WebServiceHandlerFactory class 921 <WebServices> tag 933 websites
deployment 347 formatting text 3 HTML used within 3 management 24 navigation 271, 683 updating 103
WeekendDayStyle property, Calendar 884 Where clause, SQL 391, 392 Width property
Htmllmage class 844 HtmlTable class 852 WebControl class 170, 858
wildcard character (*) 770 Windows account permissions 352 Windows authentication 399, 784
<authentication> tag setting 913 advantages 784 different domains 788 liS settings 785 impersonation 793 integrated 762, 787, 791, 793 machine.config ftle 399 methods 786 test page for 789 web services 790, 792 web.config settings 787 WindowsBuiltlnRole enumeration 788
Windows clients, TerraService 639 Windows event logs 320 Wmdows registry 645
Windows roles 789 Windows user account 924 WindowsBuiltlnRole enumeration 788 WithEvents keyword 197
automatic postback 190 connecting events declaratively 82 user control events 689
worker process isolation mode 930 Worker Process Restarts counter 736 Wrap property
Panel class 868 TableCell class 871 TableltemStyle class 884 TextBox class 873
wrappers see RCW write permission 27 Write() method
HttpResponse class 160 Trace class 340
WriteFile() method, HttpResponse 160 WriteLine() method, Stream Writer 514 WriteXml() method, DataSet 378 WSDL (Web Service Description Language ) 57 4
?WSDL 580, 595 accessing web service 579 creating proxy with WSDL.exe 624 creating web reference 619 data types 576 messages 576 methods 577 web service communications 581, 582 web service standards 574 web services 587 XMLtags 575
WSDL document 575 <binding> elements 578 <definitions> element 575 <message> elements 576 <portType> elements 577 <service> element 579 <types> element 576 custom objects 601 documenting web services 590 TerraService web service 634 web service description 591 web services testing 594 XML narnespaces 592
WSDL.exe 624, 625 <WsdlHelpGenerator> subtag
<webServices> tag 933 wwwroot directory 207
website management 25
Index
981
Index
982
X x coordinate 720 XCopy deployment 351 Xmethods 641 XML529
AdRotator control879 basics 534 case-sensitivity 534 comments 126 configuration files 529 databases and 533 DataSet access 529, 564, 566 how it works 530 integrated XML 530 integration in ADO.NET 563 meta-language 533 reading nodes, classes for 539 reading XML file 539, 548 role in .NET 529 special characters 534 validation 552 web services 530 web.config file format 126 whitespace 534 writing XML, classes for 536 XML tags, WSDL 575 XSL stylesheet transformations 559
XML classes 536 XmlDocument class 544 XmlTextReader class 539 XmlTextWriter class 536
Xmlclass Calendar control tag 885 properties 886
XML documents attributes 54 7 comments 536,547 elements 547 parsing 533, 534 searching 551 tags 547 using 544 validation against schema 555 web services testing 597 XmlElement objects 547
XML integration ADO.NET characteristics 371 DataSet object compared 372
Xml module, IBuySpy 829 XML namespaces
.NET namespaces 553 elements 553 namespace prefixes 553 naming conventions 554
specifying for web service 592 URis 553 URL address reference 592 XSD552
XMLtags532 attributes 534, 535 elements 534 nesting in root tag 534 overlapping tags 534 tagging in pairs 534
Xml web control562 XmlAttributeCollection class 550 XmlDataDocument class 564, 566 XmlDocument class 544
AppendChild() method 547 CreateAttribute() method 547 CreateComment() method 547 CreateElement() method 54 7 events 551 InsertAfter() method 547 InsertBefore() method 547 Load() method 548 nodes 547 Save() method 547 searching XML document 551 when to use 549
XmlElement class 547, 549 XmlNode class
adding content 550 adding/ removing nodes 550 changing attributes 550 cloning 550 manipulating nodes 550 properties 550 web service data types 598 XmlElement compared 549
XmlSchemaException class 556 XmlTextReader class 539
properties and methods 544 Read() method 539 when to use 549
XmlTextWriter class 536, 538 XmlTransform class 560 XmlValidatingReader class 555 XPath 530, 551 XSD (XML Schema Definition).
Visual Studio .NET creating 558 XML names paces 552 XML validation 552
XSD documents 554, 555 Xsl module, IBuySpy 829 XSLT (XML transformations) 530
stylesheet transformations 559 Xml web control562
Index
y z y coordinate 720 zero-based counting 57 Year property, DateTime 60
983
ASP Today ASPToday is a unique solutions library for professional ASP Developers, giving quick and convenient access to a constantly growing library of over 1 000 practical and relevant articles and case studies. We aim to publish a completely original professionally written and reviewed article every working day of the year. Consequently our resource is completely without parallel in the industry. Thousands of web developers use and recommend this site for real solutions, keeping up to date with new technologies, or simply increasing their knowledge.
Find it FAST! Powerful full-text search engine so you can find exactly the solution you need.
Printer-friendly! Print articles for a bound archive and quick desk reference.
Working Sample Code Solutions! Many articles include complete downloadable sample code ready to adapt for your own projects.
~ ASP.N8 1 .x and 2.0 ~ ADO.NEr and SOL ~XML
~Web Services
~ E-Commerce
~Security
~ Site Design ~Site Admin
~ SMTP and Mail
~Classic ASP and ADO
and much, much more ...
To receive a FREE two-month subscription to ASPToday, visit www.asptoday.com/subscribe.aspx and answer the question about this book!
The above FREE two-month subscription offer is good for six months from original copyright date of book this ad appears in. Each book will require a different promotional code to get this free offer- this code will determine the offer expiry date. Paid subscribers to ASPToday will receive 50% off of selected Apress books with a paid 3-month or one-year subscription. Subscribers will also receive discount offers and promotional email from Apress unless their subscriber preferences indicate they don't wish this. Offer limited to one FREE two-month subscription offer per person.