ASP .NET Web Developer s Guide - Mesbah Ahmed, Chris Garrett
.pdf680 Index
ISAPI. See Internet Server Application Programming Interface
IsBanned, 571, 648
ISBN, 522, 541, 556 supplying, 555 usage, 560
IsDefault, 365 IsEmptyElement, 365
ISP. See Internet Service Provider IsPostBack property, usage. See Pages Item, 365
capturing. See DataList control Command event, 132 function, 608
property, 602 Template, 132 ItemIndex, 314
ItemTemplate, 135, 137 Iterator object, 394
J
J++, 14
J2EE. See Java 2 Enterprise Edition
Java, 11, 24, 447, 456
support, 7
Java 2 Enterprise Edition (J2EE), 9
Java Server Pages (JSP), 7
JavaScript, 3, 24, 62, 120, 348
validation, 121. See also Client-side
JavaScript validation
Java-servlets, 518
Jet, 326
JIT. See Just-In-Time
JScript
developers. See .NET.Experience
JScript developers
programmers, 26
JScript.NET, 13
JSP, 518. See Java Server Pages Just-In-Time (JIT) compilation, 578
K
Key attribute, 179
Key-field, 97
L
Labels, usage, 103–106 Large-scale applications, 603 LastChild, 373
LastName, 571
LastRecord, 558
Legacy systems, XML interactions, 362 Length properties, 44
Let assignments, 27 level attribute, 211 Link buttons, usage, 141 LinkButton, 641, 645 List, 123
List box loading, script usage, 70–72 ListBox control, 85, 106
ListControl, 108, 141–142. See also Databound ListControls
abstract class, usage, 106–109 binding. See ArrayList examples, 132
ListPrice
element, 353, 358 node, 369
Load, 101
Local files, usage, 51 location (tag), 177, 214, 216 Logged-in administrator, 650 Logic errors, 419, 426
Log-in interface, construction, 621–628 loginCustomer, 519
page, creation, 544–545 LoginCustomers, 513 Long data types, 39
Lower-level configuration file, 177 Lower-level file, 175
M
machine.config, 174, 183 file, 176, 184, 212
machineKey tag, usage. See Encryption Machine-specific binary code, 14 Macromedia. See Ultradev
.majorversion properties, 22 Many-to-many table relationship, 504 Mark-up codes, 63
mBoardID variable, 601
MD5 hash algorithm, usage, 206 MD5 (value), 206
Member profile, editing, 638–640 Memo, datatype, 508
Memory implications, 233 resources, 269, 293
Message board, 568
browsing, 635–638 display, 488–490 transmission, 462
Message board creation, ADO/XML usage, 567
administrative interface, construction, 645–657
application design, 576–612 database, setup, 568–576 FAQs, 661–662
general functions, setup, 614–621 introduction, 568
solutions, 658–660
Index 681
user functions, creation, 638–644 MessageBinding, 461 MessageBoard class, 630
design, 611–612
Metatag. See HyperText Markup Language
Microsoft Data Engine (MSDE), 19, 28
Microsoft Intermediate Language (MSIL), 14, 18, 37
Microsoft Management Console (MMC), 10, 13, 229
usage, 231, 239
Microsoft Message Queue, 7 Microsoft Office, 51
Microsoft Transaction Server (MTS), 7, 10
Middle child, 603
.minorversion properties, 22
MMC. See Microsoft Management Console
mode attribute, 191, 205 ModeratorID, 569 Moderators, 581
Modern Relational Database technology, 323
Modified URL, 241
Modules configuration, webRequestModule tag (usage). See Request
Mono, 14
MoveNext method, 394 MoveToAttribute(i) method, 365 MoveToContent()
method, 369 statement, 368
MoveToElement method, 365 MSAccess database, 569–572 MSDATA attributes, 478
MSDE. See Microsoft Data Engine
682 Index
MSDN documentation, 436
MSIL. See Microsoft Intermediate Language
MSSQL, 537 mThread variable, 644
MTS. See Microsoft Transaction Server Multi-line comments, 24
Multi-line text, 90
Multi-page bank account sign-up form, 228
Multiple languages, code conversion, 13–14
Multiple tables, viewing. See XmlDataDocument
Multiple-table views, 379 Multi-process environment, 233
N
Name, 475 property, 364
name attribute, 210, 212 acceptance, 213
name parameter, 270 name value, 203 namespace subtag, 189 Namespaces. See System
FAQs, 58–59 function, review, 36–37 introduction, 36
set. See System.Web.Services namespace set; System.Web.UI namespace
solutions, 56–57
understanding. See Root namespace
usage, 37. See also Client/browser communication; Data; eXtensible Markup Language files; Objects;
.VisualBasic namespace NavigateUrl property, 110
Nested controls, 100 Nested elements, 387
.NET, 11 class, 234
environment, 406 language code, 14 namespaces, 232 objects, 12 obtaining/installation, 19 technology, 13
usage. See eXtensible Markup Language document
.NET DLLs, 36
.NET Framework, 12, 13, 26, 421, 449 FAQs, 414–415
introduction, 348 solutions, 410–413 XML usage, 347
Net SDK Collection Class, 95
.NET-based modules, 26 Net.Commerce, 7
.NET.Experience JScript developers, 14 Netscape 4.72, 536
Netscape 4.x, ASP.NET server controls display, 536
Netscape Netsite server, 10 Network communication, 233 Network-handling functions, 12 newPageIndex property, 152 Nodes, values retrieval, 379–380 NodeType, 373
property, 364
Non-indexed default properties, 27 Non-windows platforms, 14 Normal default value, 288 Notepad, 4, 174
usage, 350, 356 nothing object, 287
Null, 246
Number, datatype, 508
O
objControl.GetType().ToString(), 621 Object Browser, usage, 436 Object-oriented (OO)
application, 581 approach, 577–578 objects, 582
Objects, 40–43. See also Application; Request; Response objects
browser, usage. See Definitions creation. See Data
design, 579
grouping, System.Collections namespace (usage), 43–44
supplied functionality, 43–44 hierarchy, 652
orientation, 14
ODBC. See Open DataBase Connectivity
OLE Object, datatype, 508 OleDb
connection string, 305
data connection object, 519 provider, 519
OleDbCommand, 307 object, 326, 332
OleDbConnection, 307 connection string, 310 OleDbDataAdapter, 307 OleDbDataReader, 307
object, 319
OLTP. See Online Transaction Processing
On Error Resume Next statement, 422 On Error statement, 421–423
Index 683
OnCancelCommand, 157 onclick event, 556 OnClick() event, 486 OnDataBinding, 101 OnDeleteCommand, 157 OnEditCommand, 157, 314 OnEditCommandEvent, 157
One-to-many table relationship, 504 One-to-one table relationship, 504 OnInit, 101
Online forms, 486
Online Transaction Processing (OLTP), 323
OnLoad, 101 OnPageIndexChanged, 152 OnRemove, 289
onSelectedIndexChanged attribute/event, 73
onserverchange attribute, 90 OnServerValidate property, 120 onServerValidate property, 119 OnSortCommand, 150 onsubmit(), 559 OnUpdateCommand, 157 OO. See Object-oriented
Open DataBase Connectivity (ODBC), 3
connections, 476 Open Source projects, 22 Opera browser, 275 OperationBinding, 461 Option Explicit, 27
Option Strict On statement, 420 Oracle, 7, 327
OR_Date, 506
OrderBook, 513 orderBooks, 519 orderBooks.OrderItem, 556
684 Index
OR_ID, 505, 506 originUrl attribute, 211 OR_ShippedDate, 506
OutOfMemoryException, 425
Output Cache directive, usage.
See @ OutputCache directive Output caching, 266–267, 269–277, 294
advantages, 276–277 OutputBinding, 461 output_cache.aspx, 271 OverflowException, 425
P
Page, 101
Declarative statement, 79 @Page directive, 451 Page_Init, 77
Page.InitOutputCache method, 269 Page.IsPostBack, 72
Page-level DataList, 319 Page_Load, 77
event, 71–72, 77, 97, 108, 162, 281 usage, 368, 374, 408
method, 630, 640, 657 sub, 497
subroutine, 623 Page.Load event, 623 Page_Load() event, 377 Page_OnLoad event, 316 Page_PreRender event, 281
PagerStyle-HorizontalAlign, 152 Pages. See Active Server Pages
class file, 65
compilation. See ASP.NET directive, 434
directives, 76–77 events, 75
option, 181
IsPostBack property (usage), 72–73 navigation, 154–156
output, modification, 495–497 running. See ASP.NET tracing, 426–434
pages tag, usage. See Page-specific attributes
PageSize, 152
Page-specific attributes (setting), pages tag (usage), 181–182
Page_Unload, 77
Paging, providing. See DataGrid Parallel processing, 24 Parameterized stored procedure, 154 Parent, 101
Parent-child relationships, 356 Parentheses, usage, 27 passport subtags, 205, 206 Passwords, 176, 236, 569, 571
validating, 126–129 Password-type textbox, 90 path attribute, 214
Patterned strings, validating, 126–129 Payroll user control
consuming, 166–167 development, 164–166
Perl, 3–5, 117. See also Comprehensive Perl Archive Network
5, 7 Perl.NET, 13 Permissions, 208
Per-server basis, 174
Personal identification number (PIN), 230
PHP, 7, 518
PIN. See Personal identification number pnlAdd panel, understanding, 482–484
PnlThank,Thank-You panel (addition), 484
policyFile attribute, 210 Portable.NET, 14 POST, 16, 192
method, 17 parameters, 270
Post
class, design, 608–611 creation, 641–644 object, 603, 657
PostBack, role, 63 Postbacks, 166
PostList class, design, 606–608 Price, 146
Primitive types. See Standard primitive types
Primitives, arrays, 464
Priority option, usage, 288–289
Process model options (setting), processModel tag (usage), 195–200
processModel tag, usage. See Process model options
Product element, 353, 357–358 Product Name, 353, 367 Product nodes, 360
ProductId, 135–137, 146, 353 field, 158
usage, 358 ProductName, 130, 146
node, 368 Provider
attribute, 304, 310 property, 305
Proxy
classes. See Web Services Description Language
PUT, 192
Python, 13
Index 685
Q
Quasi-HTML, 628, 631, 635 Query
expressions, samples, 389–390 plan, optimization, 327 running, 276
usage. See eXtensible Markup Language document
Query Analyzer, 515 Querystring parameter values, 17
R
RAD. See Rapid Application Development
RadioButtonList control, 101, 106 RadioButtons, usage, 103–106 RangeValidator, 113–114, 128, 535
control, 118 Rank properties, 44
Rapid Application Development (RAD), 63
features, 11
Read() method, 364, 365, 368 Read-only forward-only cursor, 323 ReadOnly property, 158, 164 ReadState, 365
ReadString(), 368 ReadXml method, 408 ReadXmlSchema, 405
Real-time value verification, 62 RealXml, 405
recordCount, 558
Recordset. See firehose Recordset object, 53
usage, 301
Recursive procedure, 376 redirectUrl attribute, 206
686 Index
Register directive, 162
Registered users, 581 Regular Expressions, 4
support, 6
RegularExpression property, 115 RegularExpressionValidator, 113, 535
control, 115–117 Relational database, 502 Relational view, 378, 384
usage. See XmlDataDocument Remote database, access, 181 Remote procedure call (RPC), 448 remove attribute, 203
remove (processing directive), 189 remove subtag, 190, 192–193, 202, 207 removeCat, 528, 530
removeItem, 528–530 removeItemFromCart method, 556
RepeatColumn property, usage. See DataList
RepeatDirection attribute, 107
property, usage. See DataList Repeater code, 632
Repeater control, 52, 145, 628–631 data display, 132–135
events, capturing, 135–138 interaction. See DataBind usage, 635
Repeater server control, usage, 132–138 RepeaterCommandEventArgs, 136 Request
modules configuration, webRequestModule tag (usage), 202–203
objects, 21, 45–46 Request.Browser.Browser, 22
Request.Browser.Type property, 275 requestEncoding, default, 180
Requests mapping, httpHandlers tag (usage), 192–193
RequiredFieldValidator, 113, 535 control, 114–115
RequiredFieldValidators, 642 Resource buffering, 216 Response
buffering options, 181 messages, 63
objects, 45–46, 63, 427 responseEncoding, default, 180 Response.Write() method, 426–427 ReturnValue, 335
Reverse engineering, 356 Rexx, 3
Root element, 353, 355, 382
Root namespace, understanding, 38–43 supplied functionality, 38–43
Root node, 555
RowFilter property, 542, 545
RPC. See eXtensible Markup Language; Remote procedure call
Runtime
errors, 418, 420–426
options (setting), httpRuntime tag (usage), 194
Run-time display, 119 Run-time view, 114, 155
S
SAX. See Simple API for XML Schema, 352–353
documents, 356–360 Schema Generators, 348 Screen scrape, 12
Scripts
execution changes, 8 inclusion. See .aspx file tags, entering, 239
usage. See List box loading
SDK. See Service Definition Language;
Software Development Kit section tag, 212
sectionGroup, usage, 213 Security. See Connection strings
configuration, 179, 204–211
modules configuration, authenticationModules tag (usage), 207–208
policies mapping, securityPolicy tag (usage), 210–211
precautions, 28
securityPolicy tag, usage. See Security Select statement, 326
SelectedIndex property, 375 SelectedIndexChange events, 106 SelectedItem property, 72 SelectedItemTemplate, 139 SelectedItem.Value property, 647 SelectSingleNode function, 621 sellerAdmin, 518
Semi-static page, 292 SeparatorTemplate, 132
Server controls, 72. See also Form-type server controls; HyperText Markup Language;World Wide Web
AutoPostBack attributes, 73–77 FAQs, 171
features, 62–65 introduction, 62 mapping, 69 solutions, 168–171 states, preservation, 69
Index 687
usage, 68–69. See also HyperText Markup Language; Repeater server control
Server resources utilization, 268
Server resources, optimization, 268–269 Server Side Include (SSI), 4
Server user controls, creation. See Custom server user controls
ServerControl3.aspx, 73
Server.HTMLEncode, 45 Server.MapPath, 45 Server.MapPath(), usage, 486 Servers, communication, 448–460 Server-side code, 65, 90, 92
development, 118 Server-side controls, 113
Server-side processing, 17–18, 65–77.
See also ASP.NET Server-side programmability, 98 Server-side redirects, 8 Server-side scripting, 65 Server-side scripts, 75
tag, 120
Server-side validation, 120, 121 Server-side Web form components, 257 Server-side-only custom validator, 120 ServerValidateEventArgs class, 120 Service Definition Language (SDL), 461 ServiceDescription class, 461
Servlets technology, 7 Session
configuration, 241–243 events, usage, 243–245 information, 232 object, 97
userId value, 627 variable, 240
688 Index
usage, 545 Session ID, 15, 240 Session state, 63, 242
comparison. See Application state
configuration, sessionState tag (usage), 200–202
information, 26 understanding, 240–241
Session_OnStart event, 245 sessionState tag, usage. See Session state Set assignments, 27
setEditMode procedure, 157 SetSlidingExpiration method, 276 Settings, retrieval. See Configuration SGML, 350
SHA1 algorithm, usage, 206 SHA1 (value), 206
Short data types, 39 Show Price button, 375
showCart page methods, 556 showCatalog(), 559 showCatalog page methods, 556 showSelection
function, 142 procedure, 97, 142
ShowSummary, 123
Simple API for XML (SAX), 348
Simple Mail Transfer Protocol (SMTP), 6, 10
Simple Object Access Protocol (SOAP), 9, 12, 51, 350, 443
contracts, 533 datatype, 464 headers, 456 message, 462
usage, 448, 460–461 SimpleType data structures, 357 Singleparagraph, 123
Site, 101
Site, construction/administration. See ADO.NET shopping cart
Sliding expiration, 287 slidingExpiration, 258 Smart cards, usage, 207
SMTP. See Simple Mail Transfer Protocol
SOAP. See Simple Object Access Protocol
Socket, 211
Software Development Kit (SDK), 19 Sort methods, 44
SortByCategory, 431 SortByTime, 431 SortedList
creation/loading, 97 structure, 95–97
sortGrid sub-procedure, 150 Source data, 283
Splitter table, 504
SQL. See Structured Query Language SQL 2000, 317, 502
SQL database, 476 SQL mode, 518
SQL ORDER BY clause, 149 SQL Query, 406
Analyzer, 28, 573 SQL scripts, 581
SQL Server, 19, 52, 307–308, 330, 511 7.0 Northwind database, 406
2000 database, 502, 503 database, 475, 572–576 installation, 28
stored procedures, 327 usage, 313
Wizard, 513
SQL Server 2000, 300
SQL Statement, 324, 326, 541, 579 construction, 597–598, 646
usage, 589–590, 595, 599–601 SQL string, 132, 158
SqlClient
connection string, 305 namespace, 307
SqlCommand, 308 object, 332
SqlConnection, 308, 312 connection string, 310 object, 319
type, 322 SqlDataAdapter, 308 SqlDataReader, 308
SqlDbType enumeration, usage, 339 SqlDbTypes enumeration, 309 SQLServer database, 510–518
SSI. See Server Side Include Standard primitive types, 464 Start page, setting, 445
start.aspx page, creation, 556–558 Start-tag, 353, 355
State. See Application state; Session state example, 234–236
management, 229–231 State Bags, 16
State-full ASP Net controls, 63 State-full phenomenon, 68 State-full values, 97
State-less ASP controls, 63 Static texts, 75
Static values, 249–258 Static variables, 234, 249
counter, 252
setting, appSettings tag (usage), 179–180
Step Into, 435
Step Out, 435
Step Over, 435
Index 689
Stored procedures creation, 512–518 name, 324
strConnection property, 322 strConStr, 322
Strings, 38, 40 data type, 40 values, 38 variable, 22
Structs, 464 arrays, 464–465
Structured error handling, 423–426
Structured Query Language (SQL). See Dynamic SQL; Embedded SQL
server, 327 Sub-application, 176 Subject line, 475
Submit button, 64, 67, 230 event, 482
removal, 73
Submit Button Handler code, exploration, 484–488
Sun, 7, 9, 11
Supported connectivity. See ADO.NET Syntax errors, 418, 419
System
configuration, 179, 184–204 namespace, 38–43
System.Collections, 41, 43
namespace, usage, 594. See also Data; Objects
System.Configuration
.NameValueFileActionHandler class, 212
System.Data, 478
namespace, 37, 305–308, 476 usage. See Data
object, 52