Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Pro ASP.NET 2.0 In CSharp 2005 (2005) [eng]

.pdf
Скачиваний:
107
Добавлен:
16.08.2013
Размер:
29.8 Mб
Скачать

1218 I N D E X

Connection object, 230, 232, 235 DataReader, 306

DataSet, 279, 281 connection pooling, 237–39 connection statistics, 230 connection strings, 235 connection-based objects, 233

<ConnectionConsumer> attribute, 1077, 1079, 1083

<ConnectionProvider> attribute, 1076–78, 1082–83

ConnectionStringExpressionBuilder, 299 connectionStringName property,

SqlRoleProvider provider, 790 ConnectionStrings, 169 <connectionStrings> element, 167, 169, 1051 ConnectionsZone control, 1081 ConnectionTime, 239

ConsumerConnectionPointID parameters, 1082 Container class, 361

Contains( ) method, StringCollection class, 893 Content control, 541, 543–44, 546

content regions, 17 <Content> tag, 546 content-based objects, 233

ContentPlaceHolder control, 539–46, 549–50, 552

ContentPlaceHolderID property, 541 <ContentTemplate> tag, 793 Context property, 1101

Continue command, 55 ContinueButtonClick event, 742 control adapters, 899, 914 control attributes, 942

control builder, 961 Control class, 105–6, 900

control designers, 960, 965–68 Control State and Events, 915–23

control state, 70, 899, 917–18 overview, 915

postback data and change events, 918–21 triggering postback, 921–23

ViewState data, 915–17 control tags, 50, 81 control tree, 82–86, 95

Control.ApplyStyle method, 938 ControlDesigner, 965–66, 972–73 Control.Focus( ) method, 987 controls, ASP.NET

creating dynamically, 87–88 HTML server controls, 106–13

handling Server-Side events, 113–15 HtmlContainerControl class, 108 HtmlControl class, 107 HtmlInputControl class, 108 overview, 106–7

programmatically creating server controls, 111–13

Setting Style Attributes and other properties, 110–11

input validation controls, 132–45 BaseValidator class, 135–36 CompareValidator control, 137–38 CustomValidator control, 141 overview, 132–33

RangeValidator control, 137 RegularExpressionValidator control,

138–40

RequiredFieldValidator control, 137 using the validators programmatically,

143–44

validation controls, 133–34 validation groups, 144–45 validation process, 134–35 ValidationSummary control, 142

list controls, 127–32 BulletedList control, 130, 132 selectable, 128–31

rich controls, 145–49 AdRotator control, 146–47 Calendar control, 148–50 overview, 145–46

server controls

changes in .NET 2.0, 103 hierarchy of, 105–6 types of, 104–5

web form controls, 116–27

basic web control classes, 117–19 Colors, 120

default button, 123 enumerated values, 120 Focus( ) method, 122–23 Fonts, 121

handling Web Control Events, 124–27 overview, 116

scrollable panels, 123–24 Units, 119

WebControl base class, 117 Controls collection, Page class, 82 Controls property

Control object, 106 HTML server controls, 106 WebPart class, 1056

ControlStyle property, 338, 564–65 ControlToCompare property, CompareValidator

control, 137

ControlToValidate property, 136–38, 144 Conversion Wizard, 29–30 ConvertEmptyStringToNull property, 338 ConvertFrom, ConvertTo method, 952–53 ConvertXmlTextToHtmlText method, 928 cookie container, 1125

cookieless forms authentication, 704

cookieless setting, 221, 696, 704 cookieName option, <roleManager>

configuration tag, 789 cookiePath option, <roleManager>

configuration tag, 789 cookieProtection option, <roleManager>

configuration tag, 789 cookieRequireSSL option, <roleManager>

configuration tag, 790

cookies

custom, 213–14

persistent, in forms authentication, 705–6 SessionID, 216

state management options, 196 Cookies collection, 95, 213

Cookies member, HttpResponse class, 91 Cookies property, 90, 912 cookieTimeout option, <roleManager>

configuration tag, 790 Copy( ) method, File class, 473 CopyFrom method, Style class, 938 CopyStream( ) method, 1200 CopyTo( )method, FileInfo class, 476

CORBA (Common Object Request Broker

Architecture), 1089–91 COUNT( ) function, 358, 420

CPU (Central Processing Unit), 627 cpuMask configuration, 625 Crawler property, 912

Create( ) method DES class, 846

DirectoryInfo class, 475 FileInfo class, 475, 489 SymmetricAlgorithm class, 846

CREATE EVENT NOTIFICATION command, 419 CREATE TABLE statement, 858 CreateChildControls( ) method, 924, 931,

933–34, 1062, 1064–65, 1068, 1073, 1079 createConstraints parameter, DataRelation, 285 CreateDataReader( ) method, 279 CreateDecryptor( ) method, 847 CreateDirectory method, Directory class, 472 CreatedUser event, CreateUserWizard control,

742–44, 795 CreateEncryptor( ) method, 847 CreateMachineKey( ), 161–62

CreateMembershipFromInternalUser( ) method, 888

CreateNavigator method, XmlDocument, 439, 451

createPersistentCookie option, <roleManager> configuration tag, 790

CreatePlaceHolderDesignTimeHtml method, 966–67

CreateRole( ) method, 890 CreateSubdirectory( ) method, DirectoryInfo

class, 475

I N D E X 1219

CreateTestUser( ) web method, 1192 CreateText( ) method, File class, 489 CreateUser( ) method, 748, 885, 887, 891 CreateUserError event, 742 CreateUserIconUrl property, 728 CreateUserText property, 728 CreateUserUrl property, 728

CreateUserWizard control, 724, 740, 742–44, 795 CreatingUser event, 742

CreationTime property, 475 CreditAccount method, 1126 cross-page posting, 66

transferring information with

getting page-specific information, 210–11 overview, 209

performing cross-page posting in any event handler, 211

and validation, 211–13 CryptoAPI class, 840, 843, 845–46

Cryptographic Message Syntax (CMS), 840 cryptography

encrypting sensitive data

encrypting sensitive data in a database, 858, 860

managing secrets, 849–50 overview, 848

using asymmetric algorithms, 855–57 using symmetric algorithms, 850–55

encrypting the query string creating test page, 864–65 overview, 861

wrapping the query string, 862–64

.NET cryptography classes abstract encryption classes, 846 asymmetric encryption, 845–46 CryptoStream class, 847–48 ICryptoTransform interface, 847 overview, 843–44

symmetric encryption algorithms, 844–45

.NET cryptography namespace, 840–41, 843 overview, 839

<cryptographySettings> section, 853 CryptoStream class, 847–48, 853–54 CryptoStreamMode enumeration, 847

.cs files, ASP.NET applications, 36

CSS (Cascading Style Sheets), 107, 525–28, 533, 535, 546, 725–26

CSS style attributes, 110. See also Cascading Style Sheets (CSS)

CssClass property, 117, 342, 525, 535, 725–26 CultureInfo class, 608–10, 614

Currency data type, 340–41

Current( ) method, HttpContext class, 879 Current class, HttpContext class, 686 Current property, 100

CurrentCulture property, 609 CurrentNode property, 575

1220 I N D E X

CurrentNodeStyle style, 572 CurrentNodeTemplate template, 572 CurrentPageIndex property, DataGrid controls,

356

CurrentRole property, 891 CurrentUICulture property, 610, 612, 618 custom application pool identities, 644–47 custom cache dependencies

basic example, 421–22 overview, 420–21

using message queues, 422–24 custom control class, 933

custom controls. See also custom server controls

design time support, attributes, 943–44 with JavaScript, 996–1002

dynamic panels, 1003–6 overview, 996–97

pop-up windows, 997, 999 rollover buttons, 1000–1002

toolbox with, 907–8 custom cookies, 196, 213–14

custom data components, vs. profiles, 806 custom expression builders, 299–302 custom HTTP handlers, 185–90

configuring, 185–86 creating, 184–85 writing, 800–801

custom HTTP module, creating, 190–92 custom membership providers

architecture of, 867–68

designing and implementing custom store, 870–76

implementing provider classes

creating users and adding them to store, 880–83

implementing XmlRoleProvider, 889–94 overview, 876–78, 880

using salted password hashes, 885–87 validating users on login, 883–85

overall design, 869 overview, 867

using custom provider classes debugging using WAT, 896 overview, 894–95

Custom Objects data type, 1098 custom server controls

basics of

adaptive rendering, 912–14

creating bare-bones custom control, 900–902

creating WebControl that supports style properties, 904–7

custom controls in Toolbox, 903–4 custom controls in Visual Studio .NET, 904 rendering process, 908–9

using custom control, 902–3

changes in .NET 2.0, 899 Control State and Events, 915–23

control state, 917–18 overview, 915

Postback Data and Change events, 918–21 triggering postback, 921–23

ViewState data, 915–17 and different browsers

adaptive rendering, 914–15 browser detection, 910–11 browser properties, 912–14 HtmlTextWriter class, 909–10 overview, 909

extending existing web controls, 923–30 composite controls, 923–25

derived controls, 925–30 overview, 923

overview, 899

templated controls, 930–39 creating, 930–33 overview, 930

styles, 936–39

using customized templates, 933–36 Custom setting, 220

custom ticket-based authentication, 1189 custom type converter example, 952 custom validation, 143–45 <customErrors> element, 166, 777 CustomImageButton control, 922 CustomServerControlsLibrary, 944–45 CustomTextBox control, 945–46 CustomValidator control, 133, 141 cyrptography classes, 161

D

d command-line switch, 415 d switch, 715

DashPattern member, 1024 data binding, 106, 287, 296–334

automatic, 79

binding to methods, 364–65 data source controls

overview, 309 page life cycle, 310

to DataReader, 305–6 fundamentals, 296–309

binding to DataReader, 305–6 custom expression builders, 299–302 overview, 296

repeated-value building, 302–9 single value binding, 296–98

limits of data source controls adding extra items, 332–33 handling extra options with

ObjectDataSource, 334

I N D E X 1221

handling extra options with

limits of

SqlDataSource, 333

adding extra items, 332–33

overview, 331–32

overview, 331–32

ObjectDataSource

overview, 309

overview, 323

data types, 5, 234

selecting records, 324–28

data binding format string, 340–41

updating records, 328–29

state management options, 196

updating with a data object, 329–31

Data Utility class, 268–74

SqlDataSource

DataAdapter class, 230, 279–80,

disadvantages of, 322–23

data binding, 287

error handling, 318

filling DataSet, 280–82

overview, 311

overview, 280

parameterized commands, 314–17

searching for specific rows, 286

selecting records, 312–14

working with multiple tables and

updating records, 318–22

relationships, 282–85

and XML

databases, and ADO.NET architecture, 230–32

binding XML content from other sources,

DataBind( ) method, 106, 290, 296, 298, 304,

463

306, 916, 935–36, 1062, 1068, 1116

hierarchical binding with TreeView,

DataBinder class, 361, 369

459–61

DataBound event, GridView control, 376–77

nested grids, 458–59

DataColumn object, DataTable, 279, 283, 292

nonhierarchical binding, 453–55

data-definition, 240

overview, 453

DataField property, 338, 350

updating XML through XmlDataSource,

DataFormatString property, 338–40, 343

464

DataGrid control, 127, 361, 378, 982

using XPath, 455–57

AllowPaging property, 356

using XSLT, 461–63

binding DataReader to, 246

data binding expression, 296–98

CurrentPageIndex property, 356

data caching

PagerStyle property, 356

adding items to the cache, 402–4

PageSize property, 356–57

cache priorities, 405–6

DataGrid object, 483–88

with data source controls, 406–7

DataGridView control, 535

with ObjectDataSource, 409

DataItem property

with SdlDataSource, 406, 408–9

Container class, 361

overview, 392, 401–2

GridViewRow class, 344

simple cache test, 404–5

DataKeyFields property, 321

data components

DataKeyName property, 320

building data access component

DataKeyNames collection, 348

Data package, 267

DataKeyNames property, GridView control, 320,

Data Utility class, 268–74

329, 347, 747

overview, 265–66

DataList control, 335, 513, 1030–33

stored procedures, 267–68

DataMember property, 128

testing the components, 274–75

DataObjectTypeName property, 329

Web applications and DataSet, 277–78

DataReader class, 230, 240–53, 276, 279, 357,

data controls, 104

408, 581

Data Definition Language (DDL), 716

binding to, 305–6

Data Encryption Standard (DES), 161, 843–44

and ExecuteReader( ) method, 242–46

Data package, 267

CommandBehavior, 244

Data property, 587

overview, 242–43

Data Protection API (DPAPI), 175, 645, 850–52,

processing multiple result sets, 244–46

855–56, 861, 863–64

DataRelation object, 283–85, 293

data source caching, 392

DataRow class, 1078

data source controls

DataRow object, 278–80, 282, 284, 823

ASP.NET 2.0, 17–19

DataRowView control, 346

data caching with, 406–7

DataSet class, 279, 357, 361, 408–9, 413, 581,

ObjectDataSource, 409

1066, 1073, 1168, 1171

SdlDataSource, 406, 408–9

DataSet control, 351–52

1222 I N D E X

DataSet object, 230, 265, 276, 278–80, 282 accessing as XML, 466–68

converting to XML, 465–66 DataRow class, 280 DataTable class, 279 filling, 280–82

generic nature of, 232 overview, 278–79 sorting rows, 464

DataSet property, 467 DataSetName element, 466 DataSets

typed, 1063

Web Service data type, 1098

DataSource property, 128, 296, 302, 368, 916 DataSourceID property, 302, 333, 569 DataSourceMode property, 350, 408 DataTable class, 409, 582, 1078

DataTable control, 350–51 DataTable object, 279, 823 DataTableReader object, 279 DataTable.Select( ) method, 583 DataTextField property, 302, 305

DataTextFormatString property, 128, 302 DataValueField property, 128, 302 DataView class, 288–94

advanced data filtering with relationships, 292 calculated columns, 292–94

data filtering with, 290–91 overview, 288

sorting with, 288–89

DataView control, 308–9, 350, 352

Date data types, data binding format string, 340 DateTime class, 410

DateTimeCollection property, 960 DateTimeHelper object, 961–62 DayRender event, 926–27

Calendar controls, 149 CalendarDay class, 149

DbDataReader, 279

DCOM (Distributed COM), 1090–91

DDL (Data Definition Language), 716 DebitAccount method, Web Service example,

1126 debugging, 96

commands in break mode, 55 disabling caching while testing, 394 Visual Studio 2005

advanced breakpoints, 55–56 overview, 52

single-step, 52–53, 55 variable watches, 56–57

declarative output caching, 393–94 DecryptData( ) method, 852, 854 decryptionKey, 161

<default> option, 714–15 DefaultEvent attribute, 944

DefaultFocus property, 122 DefaultProperty attribute, 944 defaultProvider attribute, 719 defaultUrl attribute, 697, 699

DefaultValue attribute, Properties Window, 943 DefaultWsdlHelpGenerator.aspx file, 1105 DeflateStream class, 498–99

Delete( ) method Directory class, 472 DirectoryInfo class, 475 File class, 473

FileInfo class, 475 DeleteCommand property, 280, 312 DeleteInactiveProfiles( ) method

ProfileManager, 819

ProfileProvider, 830 DeleteMethod command, 329 DeleteMethod property, 324

DeleteProfile( ) method, ProfileManager class, 819

DeleteProfiles( ) method ProfileManager class, 819 ProfileProvider class, 830

DeleteRole( ) method, 890–91 Demand( ) method, 785 <deny> rule, 778–79

DependencyDispose( ) method, 422 deploying

ASP.NET, 14

websites. See website deployment Depth property, TreeNode control, 588 derived controls, 925–30

DES. See Data Encryption Standard (DES) DES (Data Encryption Standard), 161, 843–44 DES algorithm, 855

DES class, 845–47, 851 Description attribute, 943

Description member, IWebPart Interface, 1058 Description property, 720, 790, 1056, 1120 Design mode, 1052

design time support, attributes, 943–44 DesignerActionHeaderItem method, 971 DesignerActionItem collection, 971–72 DesignerActionItem object, 968 DesignerActionMethodItem( ) method, 971–72 DesignerActionPropertyItem( ) method, 971 DesignerActionTextItem( ) method, 971 DesignerSerializationVisibility attribute, 957–58 DesignOnly attribute, 944

design-time behavior, 945–46 design-time support, 516. See also code

serialization changes in .NET 2.0, 941 control designers, 965–68

basic control designer, 966–68 overview, 965

I N D E X 1223

design-time attributes, 942–46

DisplayCancelButton property, Wizard control,

attributes and inheritance, 945–46

563, 565

overview, 942

DisplayMode property, 142, 1051, 1053, 1070

Properties window, 942–45

DisplayModes property, 1052

Toolbox icon, 946

DisplayRememberMe property, 728

overview, 941

DisplaySideBar property, Wizard control, 560

smart tags

DisplayTitle property, WebPart class, 1056

ActionList class, 969–70

Dispose( ) method, 326, 1018

ControlDesigner, 972–73

Dispose event, 191, 237

DesignerActionItem collection, 971–72

Disposed event, 80, 158

overview, 968

Distributed COM (DCOM), 1090–91

Web resources, 947–49

<div> tag, 546, 549

DestinationPageUrl property, 728

DLL (Dynamic Link Library), 153, 185, 509, 620,

DetailsView control, 307, 327, 334–35, 372–74,

849, 978, 1062, 1076, 1171

377, 385–89

dllhost.exe process, 624, 626

Development Helper, ASP.NET, 59–61

DNS name, 91

DHTML (Dynamic HTML), 977

DOCUMENT object, 527, 530

DHTML (Dynamic Hyper Text Markup

Document Object Model (DOM), 995

Language), 1003–4, 1053

document structure, 430

dictionary collections, 89, 198, 223

document type definitions, 74

DictionaryEntry class, 404

document vocabulary, 430

Digest authentication, 676, 753–55

Document Window, 35

Direction property, WebPart class, 1056

document window, Visual Studio IDE, 37

directories. See also virtual directories

DOM (Document Object Model), 995

getting, 90

domain option, 697

permissions, 474

domain option, <roleManager> configuration

Directory class, System.IO, 472, 477–78

tag, 790

Directory classes. See File and Directory classes

<domain> parameter, Wsdl.exe, 1108

Directory object, 472–73, 480

domains, application, 152–53

Directory property, FileInfo class, 476

DPAPI (Data Protection API), 175, 645, 850–52,

directory separation character (\), 474

855–56, 861, 863–64

DirectoryInfo class, System.IO

DPAPI (Windows data protection API), 839

creating objects, 476

DrawArc method, 1020

methods, 475, 478

DrawClosedCurve method, 1020

properties, 475, 478

DrawCurve method, 1020

retrieving information about files, 472

DrawEllipse method, 1020

DirectoryInfo object, 472, 474–76, 480, 484–85,

DrawIcon method, 1020–21

1032

DrawIconUnstretched method, 1020

DirectoryName property, FileInfo class, 476

DrawImage method, 1020–21

Disabled HtmlControl property, 107

DrawImageUnscaled method, 1020

Disabled property, HTML server controls, 107

drawing dynamic graphics, with GDI+, 1018–19

DISCO standard, 1094–95

Drawing namespace, colors, 120

disconnected data, 278–80, 282, 285, 290

DrawLine method, 1020

data model, 229

DrawLines method, 1020

DataAdapter class, 280

DrawPath method, 1021, 1023

DataSet classes, 278–80

DrawPie method, 1021

DataView class

DrawPolygon method, 1021

advanced data filtering with relationships,

DrawRectangle method, 1021

292

DrawRectangles method, 1021

calculated columns, 294

DrawString method, 1018, 1021, 1035

data filtering with, 290

DropDownList control, 127, 302, 331–32, 368,

overview, 265, 276

519

discovery, 1094–95

Duration attribute, OutputCache directive, 393

disk output cache, 392

dynamic control creation, 87–88

DiskCacheable attribute, 401

dynamic graphics with GDI+, 1017–42

Display property, BaseValidator Class, 136

charting with GDI+, 1037–42

1224 I N D E X

drawing

Graphics class, 1020–22

image format and quality, 1019–20 overview, 1016–17

simple drawing, 1017–18 using GraphicsPath, 1023 embedding in web page, 1028–37

custom controls that use GDI+, 1033–37 overview, 1028–29

passing information to a dynamic images, 1030–33

using PNG format, 1029–30 Graphics class, 1022 ImageMap control

creating hotspots, 1012–13 custom hotspots, 1014–16 handling hotspots clicks, 1013–14 overview, 1011–12

overview, 1011 pens, 1024, 1026

simple drawing, 1019 using GraphicsPath, 1023

Dynamic HTML (DHTML), 977 Dynamic Hyper Text Markup Language

(DHTML), 1003–4, 1053 dynamic interfaces, 66

Dynamic Link Library (DLL), 153, 185, 509, 620, 849, 978, 1062, 1076, 1171

dynamic panels client page, 1005–6

DynamicPanel class, 1003–5 DynamicPanelRefreshLink control, 1005 overview, 1003

DynamicHoverStyle style, 596 DynamicMenuItemStyle style, 596 DynamicMenuItemTemplate property, 596 DynamicMenuStyle style, 596 DynamicPanel class, 1003–5 DynamicPanel control, 1005 DynamicSelectedStyle style, 596

E

E command-line switch, 415 E switch, 715, 717

EcmaScriptVersion property, 912 ed command-line switch, 415 Edit mode, 1052

EditItemIndex property, GridView control, 367 EditItemTemplate mode, 362–63 EditItemTemplate property, GridView control,

367

EditItemTemplate template, 370, 374 EditorPart control, 1073–74 EditorWebZone control, 1070

EditorZone control, 1052, 1054, 1070, 1072 EditRowStyle style, 341

EditValue method, 963

email address, regular expression, 140 <embed> tag, 988

embedded code, 4, 81, 94

embedding dynamic graphics in web page, 1028–37

custom controls that use GDI+, 1033–37 custom control class, 1034–35 overview, 1033–34

rendering page, 1035–37 overview, 1028–29

passing information to a dynamic images, 1030–33

using PNG format, 1029–30 EmitConformanceClaims property, 1131 <Employees> tag, 1118 EmptyDataRowStyle style, 341 EmptyDataTemplate mode, 362, 364 EmptyDataTemplate template, 374 enable configuration, 624

enable setting, 651 EnableCaching property, 407

EnableClientScript, BaseValidator class property, 136

EnableClientScript property, validation controls, 136

EnableConstraints property, 285 enableCrossAppRedirects option, 696 Enabled BaseValidator class property, 136 Enabled option, <roleManager> configuration

tag, 789 Enabled property

validation controls, 136 Web Form controls, 117 of WebServer class, 117

Enabled Trace option, 99 enableKernelOutputCache setting, 651 enableObsoleteRendering attribute,

xhtml11Conformance element, 76 EnablePaging property, 357 EnablePasswordReset property, 720 EnablePasswordRetrieval property, 720 EnableSession property, 1120 EnableSortingAndPagingCallbacks property,

GridView control, 365 EnableTheming property, 533, 536 EnableVersionHeader setting, 651 EnableViewState property, 70, 81, 106, 204, 303,

916

EnableViewStateMAC property, 669 encoded tags, 94

encoding, with Secure Sockets Layer, 681–82.

See also SOAP encoding text, 490

EncryptData( ) method, 852, 856 EncryptedQueryString class, 862–64 encrypting configuration sections, 175

encrypting data, 673, 806. See also Data Encryption Standard (DES)

and Machine.config file, 161–62 managing secrets, 849–50 overview, 673, 848

sensitive data in database, 858, 860 using asymmetric algorithms, 855–57 using symmetric algorithms, 850–55 view state, 72

encryption classes, 673 enctype attribute, 109 EndCap member, 1024

EndGetEmployeesCount method, 1112 EndInvoke( ) method, 1176–77 EndPageLoad JavaScript function, 981 EndRequest, Application, 157 enforcing SSL connections, 681–82

EnsureChildControls( ) method, 924, 935, 1067 enumerated values, 120

enumeration, 16 Enumerations data type, 1098 equal (=) sign, 65

error handling SqlDataSource, 318 structured, 11

Error List, Visual Studio, 35, 38–39 Error method, Application, 158–59 error underlining, 46 ErrorMessage property, 136–37, 143

escaped character sequence example (\\), 474 et parameter, 417

Eval( ) method, DataBinder class, 346, 361–62, 367, 369

event handlers, 50–51, 67, 78–80, 82, 88, 114, 125, 155–56

Event Model, 66–67 event trackers, 124–25

EventArgs object, 126, 385, 514–15, 1182 EventLogWebEventProvider provider, 663 <eventMappings> element, 660–61, 663 events, how connected to event handlers, 50–51 Exception.Message property, 250

exceptions, file access, 474 exclusive locks, 258

execute permission. See also Permissions ExecuteNonQuery( ) method, ADO.NET

Command classes, 241, 247 ExecuteReader( ) method, and DataReader

class, 242–46 CommandBehavior, 244 overview, 243

processing multiple result sets, 244–46 ExecuteScalar( ) method, 241, 247, 358, 469 ExecutionTimeout setting, 651

Exists( ) method Directory class, 472 File class, 473

I N D E X 1225

Exists property, 475 ExpandableObjectConverter, 955, 957 ExpandDepth property, TreeView control, 585 ExpandImageUrl property, 590

Explicit localization expressions, 614 Exponential data type, 340–41 ExportMode property, WebPart class, 1056 Expression property, 292 ExpressionBuilder class, 299

Expressions property, 614

extensible data provider model, ADO.NET, 231 eXtensible Markup Language. See XML eXtensible Stylesheet Language (XSL), 450–51 Extension property, 475

ExtensionType property, 1196

F

FactoredProfileProvider coding

initialization, 832–33 overview, 832

reading profile information, 833–35 updating profile information, 835

designing, 831–32 testing, 836–38

FailureAction property, 728 FailureStyle style, 726 FailureText property, 727 Ferguson, Derek, 105

file access, 472, 474

file access objects, locking, 497–98 file and cache item dependencies, 410 File and Directory classes, 472–88

DirectoryInfo and FileInfo classes, 474–76 DriveInfo class, 477–78

file browser, 483–88

filtering files with wildcards, 480 overview, 472

Path class, 481–83

retrieving file version information, 480–81 working with Attributes, 478–80

file authorization, 783–84

file browser, File and Directory classes, 483–88 File class, System.IO namespace, 473

file mappings, 186

File Transfer Protocol (FTP), 636, 653, 655 file type mapping, 798–99

FileAccess value, 494 FileAttributes enumeration, 478–79 FileAuthorizationModule, 783 FileInfo class, System.IO

creating objects, 476 methods, 475–76, 478 properties, 475–76, 478

retrieving information about files, 472 FileMode value, 488–89, 494

1226 I N D E X

FileName property, 890

FontUnit type, 121

filenames, unique, 494–97

FooterRow property, GridView control, 375

files

FooterStyle property, 338

retrieving file size, 474

FooterStyle style, 341

retrieving information about, 472, 474

FooterTemplate mode, 363

source-code. See source-code files

FooterTemplate template, 374

FileStream class, 498, 800, 847, 1165

FooterText property, 338

FileStream constructor, 488, 494

FOR XML AUTO, ELEMENTS query, 469

FileSystemInfo object, 475, 484

FOR XML AUTO query, 468

FileUpload control, 1049

FOR XML clause, 468

FileUpload.PostedFile.InputStream property,

ForeColor property, Web Form controls, 117

493

Form property, HttpRequest class, 90

FileVersionInfo object, 480–81, 488

form tags, 66, 69, 85, 119

FillClosedCurve method, 1021

Format property, 510–11

FillEllipse method, 1021

formatting

FillPath method, 1021, 1023

format strings, 340–41

FillPie method, 1021

and master pages, 549

FillPolygon method, 1021

for websites, standardizing, 525–28.

FillRectangle method, 1017–18, 1021

See also themes

FillRectangles method, 1021

Formatting property, 432

FillRegion method, 1021

<forms /> tag, 697, 699, 704

FillSchema( ) method, DataAdapter class, 280

forms authentication, 19, 162, 671. See also

<FilterParameters> section, 408

login page, custom, creating

filters, ISAPI, 184

advantages, 690–91

FindAll( ) method, 888

classes, 694

FindControl( ) method, 88, 106, 144, 518, 732,

configuring, 713–14

738–39, 1005

credentials store in web.config, 697–98

HTML server controls, 106

overview, 695–97

MasterPage class, 551

creating custom login page, 698–702

FindInactiveProfilesByUserName( ) method

cookieless forms authentication, 704

ProfileManager, 819

hashing passwords in web.config, 703

ProfileProvider, 831

logging out, 702–3

FindProfilesByUserName( ) method

custom credentials store, 704–5

ProfileManager, 819

denying access to anonymous users, 698

ProfileProvider, 830

disadvantages, 692–93

FindSiteMapNode( ) method, SiteMap control,

overview, 689–90

575

persistent cookies in, 705–6

FindUsersByEmail( ) method, 888

why to not implement yourself, 693–94

FindUsersInRoles( ) method, 893

Forms collection, 65, 95

FinishButtonClick event, 563–64, 743

<forms> element, 705

FinishNavigationTemplate style, 566

FormsAuthentication class, 694, 699, 702

FinishPreviousButtonStyle style, 565

FormsAuthenticationEventArgs class, 694

firehose cursors, 241

FormsAuthenticationModule class, 694–95

FirstDayOfWeek property, Calendar control, 148

FormsAuthenticationModule module, 684

FirstPageImageUrl property, 360

FormsAuthenticationTicket class, 694

FirstPageText property, 360

FormsIdentity class, 694

Fixed Decimal data type, 340–41

FormsView control, 560

Focus( ) method, 122–23

FormView control, 307, 334–35, 374, 389

folders

forward slash (/) character, XPath expression,

settings, 637–40

443

and themes, 529–30

fragment caching (partial caching), 392, 398,

Font property

522

FontInfo object, 121

frames, JavaScript, 1006–9

Web Form controls, 117

frame navigation, 1007–8

WebServer class property, 117, 121

inline frames, 1008–9

FontInfo object, 955, 1018

overview, 1006–7

Fonts property, 121

Frames property, 912

FromBase64String( ) method, Convert class, 854 FromImage( ) method, Graphics class, 1017 FromString Custom Type Converter, 952 FromXml( ) method, 856

FTP (File Transfer Protocol), 636, 653, 655 Full Unicode (UTF-16), 490

FullName property, 475, 482, 485 full-text match algorithm, 238 function overloading, 244, 253

G

GAC. See global assembly cache (GAC) GAC (global assembly cache), 43, 154, 647 gacutil.exe utility, 60, 647

garbage collection, 11, 79–80, 158 GDI+. See dynamic graphics with GDI+ GenerateKey( ) method, 856 GenericPrincipal class, 694

generics

C# 2005, 16

web services support for, 1099 GenericWebPart class, 1054–58, 1060, 1075 GetAccessControl( ) method, 473 GetAllInactiveProfiles( ) method

ProfileManager, 819

ProfileProvider, 830 GetAllProfiles( ) method ProfileManager, 819 ProfileProvider, 830

GetAllRoles member, Roles class, 794 GetAllUsers( ) method, 746

GetAnonymous( ) member, WindowsIdentity object, 764

GetAttributes( ) method, File class, 473 GetAuthCookie( ) method,

FormsAuthentication class, 705–6 GetBytes( ) method, 854 GetCallbackEventReference( ) method, 995 GetCallbackScript( ) method, 1005 GetChar, DataReader class, 242 GetChildControlType method, 961

GetChildRows( ) method, DataRow class, 284 GetCodeExpression( ) method, 299–300 GetColor( ) method, 1040–41 GetCoordinates( ) method, 1015 GetCreationTime( ) method

Directory class, 472 File class, 473

GetCurrent( ) method, WindowsIdentity class, 764, 774

GetCurrentDirectory( ) method, Directory class, 473

GetDateTime, DataReader class, 242 GetDesignTimeHtml method, Control Designers, 965, 967

GetDirectories( ) method, 480

I N D E X 1227

Directory class, 472 DirectoryInfo class, 475

GetDrives( ), DriveInfo class, 478 GetEditStyle method, UI type editor, 963 getElementById( ) method, 1004

GetElementsByTagName, XmlDocument class, 440–42, 443

GetEmployees( ) web method, Web Service example, 1118

GetEmployees method( ), Web Service example, 1096–97, 1104, 1120–21

GetEmployeesAsync( ) method, 1182 GetEmployeesCount( ) method, 1096–97,

1103–4, 1112, 1197, 1202 GetEmployeesDataSet method, Web Service

example, 1121–22 GetEmptyDesignTimeHtml method, Control

Designer, 965–67 GetExecutingAssembly( ) method, Assembly

class, 603

GetFactory( ) method, DbProviderFactories class, 260

GetFileName( ) method, 482–83, 495 GetFiles( ) method

Directory class, 472 DirectoryInfo class, 475, 1032

GetFullPath( ) method, 483 GetHierarchcialView( ) method, XmlDataSource

class, 459

GetHistory( ) method, Wizard control, 564 GetImageUrl method, 984, 1032 GetInitializer( ) method, 1197–98 GetInt32, DataReader class, 242 GetLastAccessTime( ) method

Directory class, 472 File class, 473

GetLastWriteTime( ) method Directory class, 472

File class, 473 GetLocalResourceObject( ) method, 617

GetLogicalDrives( ) method, Directory class, 472

GetNumberOfInactiveProfiles( ) method ProfileManager, 819

ProfileProvider, 831 GetNumberOfProfiles( ) method,

ProfileManager, 819 GetNumberOfUsersOnline( ) method, 888 GetPaintValueSupported method, UI type

editor, 963

GetParent( ) method, Directory class, 473 GetPassword( ) method, 748 GetPersistInnerHtml( ) method, 960 GetPostBackEventReference method( ), 921–22 GetProducts method( ), Web Service example,

1121

GetProfile( ) function, ProfileBase object, 818