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

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

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

1228 I N D E X

GetProfile( ) method, Profile class, 821 GetPropertyValue( ) method, ProfileBase, 811 GetPropertyValues( ) method, 830, 833 GetRandomNumber( ) method, 300 GetRedirectUrl( ) method, 706

GetRole( ) method, 891

GetRolesForUser member( ), Roles class, 794 GetRolesForUsers( ) method, RoleStore class,

893

GetSchema( ) method, IXmlSerializable interface, 1162

GetSection( ) method, Configuration class, 170 GetSortedActionItems( ) method,

DesignerActionList, 971 GetString( ) method, 854

GetUser( ) method, Membership class, 744, 747, 887, 889

GetUserByName( ) method, UserStore class, 887 getUserProcedure attribute, 831

GetUsers( ) method, Membership class, 710 GetUsersInRole member( ), Roles class, 794 GetValidators( ) method, Page class, 145 GetValue method, ADO.NET DataReader

classes, 246

GetValues, DataReader class, 241 GetVaryByCustomString( ) function, 396 GetVersionInfo, 480 GetVersionInfoString, 488 GetWebPageAsString method, 983 GetWebResourceUrl( ) method,

Page.ClientScript, 948 GetXmlDocument( ) method, XmlDataSource

class, 464

global application events, 152, 158, 190, 682, 684. See also global.asax file

global assembly cache (GAC), 43, 154, 647 global.asax file, 36, 153, 155–59, 682, 684 globally unique identifier (GUID), 495 GradientLabel control, 1033–35 GradientLabel.aspx, 1035

graphics. See dynamic graphics with GDI+ Graphics class, 1020–23

greedy matching, 929

GridView control, 18–19, 307–8, 319–20, 324–25, 328, 331–32, 341–44, 389, 453–54, 458, 560, 564, 576–78, 729, 745, 747, 1049, 1060, 1066–68, 1070, 1078

defining columns, 336–39 formatting

fields, 340–41 overview, 339

specific values, 344–46 styles, 341–44

overview, 336

paging

automatic, 355–57 custom pagination with

ObjectDataSource, 357–60 customizing Pager bar, 360 overview, 355

parent/child view in single table, 377–78 row selection

overview, 346 SelectedIndexChanged Event, 348–49 using data field as select button, 349

using selection to create master-details form, 346–48

serving images from database, 379–84 sorting

advanced, 354

with ObjectDataSource, 351–52 overview, 350

and selection, using at same time, 353 with SqlDataSource, 350–51

summaries in, 375–76 templates

and binding to methods, 364–65 editing in Visual Studio, 363–64 editing with, 367–71

handling events in, 366 multiple, 362 overview, 361–62

GridViewRow control, 344 GridView.RowCommand event, 828 <group> element, 814

Groups member, WindowsIdentity object, 763 Guest value, WindowsBuiltInRole enumeration,

763

GUID (globally unique identifier), 495 GZipStream class, 498–99

H

HasChanged property, 421 HasChildNodes property, 576

HasControls method, HTML server controls, 106

hash codes, 72, 206 HashAlgorithm, 843

HashForStoringInConfigFile method, FormsAuthentication class, 703

hashing passwords in web.config, 703 HashPasswordForStoringInConfigFile property,

887 Hashtable class, 201–2

hashtables, data binding with, 304 HasSharedData property, WebPart class, 1056 HasUserData property, WebPart class, 1056 HatchBrush, 1026

HeaderImageUrl property, 338 Headers Collection, Trace Log, 95

Headers property, HttpRequest class, 90 HeaderStyle property, 338, 341, 344, 565 HeaderTemplate mode, 363 HeaderTemplate template, 374 HeaderText property, ValidationSummary

control, 142, 338, 564 health monitoring in ASP.NET 2.0

basic structure, 660

events and providers, 660–63 overview, 660

<healthMonitoring> element, 661–62

Height property, Web Form controls, 117, 945 HelpMode property, WebPart class, 1056, 1072 HelpPageIconUrl property, 728

HelpPageText property, 728 HelpPageUrl property, 728

HelpUrl property, WebPart class, 1056–57, 1072 hexadecimal color numbers, 120

hidden input field, 70, 72

Hidden property, WebPart class, 1056 hierarchically rendered pages, 85–86 HorizontalPadding property, 589 HotSpotMode property, ImageMap, 1013 hotspots

creating, 1012–13 custom, 1014–16

handling hotspots clicks, 1013–14 HotSpots property, ImageMap, 1012 HoverNodeStyle property, 590

HTML (HyperText Markup Language) color names, 120

encoding, 93–94

forms, page processing, 64–66 special characters, 93, 95

HTML server controls, 106–13 control events, 113 EventArgs object, 126

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

overview, 106–7

programmatically creating server controls, 111–13

properties

Attributes property, 107 ClientID property, 106 Controls property, 106 Disabled property, 107 EnableViewState property, 106 ID property, 106

InnerHtml property, 108 InnerText property, 108 Page property, 106 Parent property, 106

I N D E X 1229

Style property, 107 TagName property, 107 Visible property, 106

Setting Style Attributes and other properties, 110–11

HTML tables, 34

HTML tags, static, 33–34 Html32TextWriter class, 909 HtmlAnchor class, 109 HtmlButton class, 109 HtmlContainerControl class, 108 HtmlControl class, 107 HtmlDecode( ) method

HttpServerUtility class, 94 ServerUtility class, 92

HtmlEncode( ) method HttpServerUtility class, 94, 928 HttpUtility class, 668 ServerUtility class, 92

HtmlEncode property, 338 HtmlForm class, 109 HTMLForm class Controls, 85

HtmlGenericControl class, 104, 108, 110, 1009 HtmlHead control, 86–87, 110, 550 HtmlHead server control, 63

HtmlImage class, 109 HtmlImage control, 548 HtmlInputButton class, 109 HtmlInputCheckBox class, 109 HtmlInputControl class, 108 HtmlInputFile class, 109 HtmlInputHidden class, 109 HtmlInputImage class, 109

HtmlInputImage control, EventArgs object, 126–27

HtmlInputRadioButton class, 109 HtmlInputText class, 109

HtmlInputText control, HTML Server Control, 110–11

HtmlInputText.Value property, 13 HtmlSelect class, 109

HtmlTable class, 110 HtmlTableCell class, 110 HtmlTableRow class, 110 HtmlTextArea class, 110

HtmlTextWriter class, 900–901, 909–10, 925, 1068

HtmlTextWriterAttribute enumeration, 901 HtmlTextWriterStyle enumeration, 901 HtmlTextWriterTag enumeration, 901 HtmlTitle control, 110

HTTP, 3

context, accessing, 100–101 errors, 166

HTTP (Hyper Text Transfer Protocol), 702, 705–6, 879

1230 I N D E X

HTTP handlers, 153, 183–90, 1034 configuring custom, 185–86 creating advanced, 187–90 creating custom, 184–85 custom, writing, 800–801

registering without configuring IIS, 186–87 and session state, 190

HTTP headers, name/value collection, 90 HTTP modules, 153, 183–84, 190–92 HTTP pipeline, extending, 182–92

configuring custom HTTP handler, 185–86 creating advanced HTTP handler, 187–90 creating custom HTTP handler, 184–85 creating custom HTTP module, 190–92 HTTP handlers and HTTP modules, 183–84 overview, 182

registering HTTP handlers without configuring IIS, 186–87

HTTP POST command, 1118 HTTP request, 89, 152

HTTP runtime settings, 651–52 HttpApplication object, 89, 684 HttpApplicationState class, 89 HttpBrowserCapabilities class, 912–14 HttpBrowserCapabilities object, 912–14 HttpBrowserCapabilities Properties, 913–14 HttpCachePolicy class, 397–98 HttpContext class, 399, 685–86 HttpContext object, 684

HttpCookie class, 706 <httpHandlers> section, 800 HttpModule class, 694

HttpRequest class, System.Web namespace, 89–90, 912

HttpRequest object, 912 HttpResponse class, 398

IsClientConnected property, 92 members, 91–92

<httpRuntime> element, 651 HttpRuntime.UnloadAppDomain method, 153 HTTPS (Hyper Text Transfer Protocol Secured),

619

https:// Secure Sockets Layer address, 677, 681 HttpServerUtility class, 92–94, 208 HttpSessionState class, 89, 216–17, 221, 403 HTTP.SYS driver, 627

Hyper Text Transfer Protocol (HTTP), 702, 705–6, 879

Hyper Text Transfer Protocol Secured (HTTPS), 619

HyperLink attributes, 907 Hyperlink control, 118, 515 HyperlinkField column, 337 HyperLinkStyle style, 726

HyperText Markup Language. See HTML (HyperText Markup Language)

Hypertext Transfer Protocol. See HTTP

I

i switch, 717

IButtonControl interface, 123, 558 ICallbackContainer interface, 1005 ICallbackEventHandler interface, 993, 995, 1003 ICollection interface, 357

ICryptoTransform interface, 847 ID

Control Class property, 106 dynamic control, 88 session, 95, 214–15, 217, 221

ID property, 106, 518 IDataReader interface, 279 IDbTransaction interface, 256 identity

Configuration setting, 165 role-based authorization, 686 tracking, 1190–91

identity element, web.config files, 165 <identity> element, 626, 769 IDisposable interface, 326 idleTimeOut setting, 624, 651 IEnumerable interface, 323

IETF (Internet Engineering Task Force), 756 IFormatter interface, 500

IHttpHandler interface, 184, 639, 800–801 IHttpModule interface, 682, 684–85 IIdentity class, 694

IIdentity interface, 686–87 IIdentity object, 687 IIPrincipal object, 687

IIS. See Internet Information Services (IIS) IIS Manager, 759

IIS software, 677

IIS_WPG (IIS Worker Process Group), 646 IL (Intermediate Language), 8, 11 ILDASM.exe tool, 10, 849

Image controls, 118

ImageButton, Basic Web control, 126–27 ImageButton control, 366, 535, 558, 738, 1011 ImageButton controls, 118

ImageButton property, 366 ImageClickEventArgs object, 126 ImageField column, 337 ImageMap control

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

images. See dynamic graphics with GDI+ images, drawing custom images, GDI+, 1022 Image.Save method, 1018, 1028 ImageToolTip property, 585, 593

ImageUrl, Basic Web control, 118, 147 ImageUrl property, 585, 589, 593, 596 <img> tag, 548, 1033

ImmutableObject attribute, 944

Impersonate( ) method, WindowsIdentity, 763, 772–73

impersonation, 671

Implicit localization expressions, 613 ImportSchemaType( ) method, 1171 INamingContainer interface, 923–24, 930, 933 Indentation property, 432

IndexOf( ) method, Array class, 369 inheritance, configuration, 162–63 Inherits attribute, 509

Init event, Page class, 77, 79–80, 82, 191, 550, 552 Initialize( ) method, 830, 833–34, 877, 889, 1197 InitialValue, RequiredFieldValidator Control

property, 137

inline code model, for coding web pages, 47 inline frame, 1008–9

in-memory resources, 152

InnerHtml HtmlContainerControl property, 108 InnerHtml property, HTML server controls, 108 InnerHtmlContainerControl property, 94 InnerProperty, 958

InnerText property, HTML server controls, 94, 108

InProc setting, 218

input controls, 106, 108, 918–19 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 validators programmatically, 143–44 validation controls, 133–34

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

InputParameters collection, 327

Insert( ) method, Cache class, 333, 402–3, 418, 422

InsertCommand property, 280, 312, 318 InsertItemTemplate template, 374 InsertMethod command, 329 InsertMethod property, 324 InsertVisible property, 338 InstallCommon.sql script, 716 installing

Internet Information Services (IIS), 631–34 WSE, 1204

InstallMembership.sql script, 716 InstallPersistSqlState.sql script, 220, 717 InstallPersonalization.sql script, 716 InstallProfile.sql script, 716 InstallRoles.sql script, 716 InstallSqlState.sql script, 220, 717

I N D E X 1231

InstatiateIn method, 931 InstructionText property, 727 InstructionTextStyle style, 726 integrated debugger, 1110

integrated state serialization mechanism, 69–70, 72

integrated Windows authentication, 753 Kerberos authentication, 756–57, 759 NT LAN Manager authentication, 755–56

IntelliSense, Visual Studio, 43–44, 46, 75 Intermediate Language (IL), 8, 11 Internet analysis company (Netcraft), 15

Internet Engineering Task Force (IETF), 756 Internet Information Services (IIS), 14, 152,

184–87, 393, 414, 619–22, 634–45, 648–51, 664, 671–73, 681, 685, 695, 718, 759–60

IIS 5.x process model, 623–26 IIS 6.x process model, 626–31 installing, 631–34

installing certificates in, 679–81 overview, 619

request processing with IIS and ASP.NET, 622–23

security, 675–76. See also Secure Sockets Layers (SSL)

and URL processing, 620–22 Internet Protocol (IP), 621, 675–76

Internet Server Application Programming Interface (ISAPI), 5. See also ISAPI extensions; ISAPI filters

invisible authentication, 751 Invoke( ) method, 1112, 1177

IP (Internet Protocol), 621, 675–76 IP address, 91 IPostBackDataHandler, 919, 921 IPostBackEventHandler, 1000, 1002 IPrincipal class, 694

IPrincipal interface, 95, 686 IPrincipal object, 762, 784

IsAnonymous member, WindowsIdentity object, 763

ISAPI (Internet Server Application Programming Interface), 5. See also ISAPI extensions; ISAPI filters

ISAPI extensions, 153, 184, 620–25, 637, 650, 659 ISAPI filters, 184

IsAuthenticated property, HttpRequest class, 90, 687

IsAuthorized property, WebPartAuthorizationEventArgs class, 1083

IsCallback property, Page class, 996 IsClientConnected property, HttpResponse

class, 92 IsClientScriptBlockRegistered method, 1001 IsClosed property, WebPart class, 1056

1232 I N D E X

IsCookieless, HttpSessionState settings, 217 IsEnabled property, Trace object, 96

IsGuest member, WindowsIdentity object, 763 IsInRole( ) method, 686, 762, 784–85, 792 IsLockedOut property, 748

IsNewSession, HttpSessionState settings, 217 IsolationLevel enumeration, 258

IsPostBack, Page class property, 78, 89 IsPostBack property, Page class, 78, 996 IsReusable, IHttpHandler interface property, 184 IsSecureConnection property, HttpRequest

class, 90, 682

IsShared property, WebPart class, 1056 IsStandalone property, WebPart class, 1056 IsStartupScriptRegistered method, 1001 IsStatic property, WebPart class, 1056

IsSystem member, WindowsIdentity object, 763 IStateClientManager interface, 215 IsUserInRole member, Roles class, 794 IsUserInRole property, 893

IsValid property, 78, 136, 141, 702 ItemCommand event, 486

ItemCreated event, GridView control, 365 ITemplate object, 930–31

Items collection, 513 Items property, 128, 513 ItemStyle property, 338 ItemTemplate control, 361 ItemTemplate mode, 363

ItemTemplate property, 932–33 ItemTemplate template, 374, 487 ItemUpdated event, 385–86 iterators, C# 2005, 16 IWebEditable interface, 1075 IWebPart interface, 1058–61

IXmlSerializable interface, 1129, 1161–65, 1167

J

Java, 7

JavaApplets property, 912

JavaScript, 14, 67–68, 104–5, 110, 124, 975–84, 986–87, 997, 999–1002, 1007–9

client callbacks creating, 991–95

how they work, 995–96 overview, 991

code, 913

custom controls with, 996–1002 dynamic panels, 1003–6 overview, 996–97

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

events, 976–77 frames, 1006–9

frame navigation, 1007–8 inline frames, 1008–9 overview, 1006–7

overview, 975–76 script blocks, 978–87

creating JavaScript page processor, 979–82 overview, 978–79

rendering, 986–87

using JavaScript to download image asynchronously, 982–84, 986

script injection attacks overview, 987–88

request validation, 988–90 validation routines, 132, 141

JavaScript property, 912

JIT (Just-In-Time) compilation, 8–9 JOIN query, 284

Just-In-Time (JIT) compilation, 8–9

K

KDC (Key Distribution Center), 757 Kerberos, 675, 711, 755–57, 759 Key Distribution Center (KDC), 757 Key property, 852

KeyFields, 320

keyFile parameter, 852 keywords, 11, 147

L

Label control, 118, 519, 533, 602 LabelStyle style, 726

language

computer, 5, 8, 12, 178

<language> parameter, Wsdl.exe, 1108 preferences, 91

language compilers, .NET, 24–25 LastAccessTime property, 475 LastActivityDate( ) method, 887 LastActivityDate property, 884, 888–89 last-in-wins updating, 273 LastLoginDate property, 884 LastPageImageUrl property, 360 LastPageText property, 360 LastWriteTime property, 475, 485 layout, for websites, standardizing, 538.

See also master pages LayoutEditorPart control, 1072 LayoutTemplate control, 730 lazy initialization, 153 LeafNodeStyle property, 590

Length property, FileInfo class, 476, 484 LevelMenuItemStyles collection, 596 LevelSelectedStyles collection, 596 LevelSubMenuStyles collection, 596 libraries, class, 7, 185

lifetime, state management options, 196 limited-length fields, regular expression, 140 linear processing model, 66–67 LinearGradientBrush class, 1026–27, 1036

I N D E X 1233

LineCap properties, 1024

localization of Web applications

LineJoin member, 1024

and Common Language Runtime (CLR),

LinkButton class, 1005

607–10

LinkButton control, 118, 515, 558, 577, 738

local resources for single page, 611–15

LinkClicked event, 515–16

localizing static text, 617

LinkedStyleSheets property, 86

overview, 607

LinkTable control, 512–13

sharing resources between pages, 615–17

LinkTableEventArgs class, 515

text directions, 618

LinkTableItem object, 513

localOnly option, 99

LinkWebControl class, 906, 915–16

Locals variable watch window, Visual Studio

Linux operating system, 9

.NET, 56

list controls, 127–32

<location> elements, 163–64, 781

BulletedList control, 130, 132

Lock, 223, 494

ListControl class, 128

locked settings, 163

overview, 127

locking file access objects, 497–98

properties

Log, 495, 500

AutoPostBack property, 128

LogEntry object, 500

CellPadding property, 129

LoggedIn event, 731–32

CellSpacing property, 129

<LoggedInTemplate> template, 793

DataMember property, 128

Logger class, 498

DataSource property, 128

LoggingIn event, 731

DataTextFormatString property, 128

Login control, 714, 723–24, 736–37, 883

DataValueField property, 128

overview, 724–27

Items property, 128

programming, 730–33

RepeatColumn property, 129

and templates, 728–30

RepeatDirection property, 129

login controls, 104

RepeatLayout property, 129

login page, custom, creating, 698–702

SelectedIndex property, 128

cookieless forms authentication, 704

SelectedItem property, 128

hashing passwords in web.config, 703

TextAlign property, 129

logging out, 702–3

selectable, 128–31

LoginButtonImageUrl property, 728

using, 129

LoginButtonStyle style, 726

ListBox control, 127, 302, 305, 325, 531, 576,

LoginButtonText property, 727

1038–40

LoginButtonType property, 727

ListControl class, 128

LoginError event, 731–32

listener, trace, 96

LoginImageUrl property, 733

ListItem.Disabled property, 130

LogInputMessage( ) method, 1200–1201

ListItem.Selected property, 130

LoginStatus control, 723, 733

Literal control, 299, 303, 437, 617, 738

LoginText property, 733

literal slash, C#, 474

loginUrl option, 696

LiteralControl, 924

LoginView control, 723, 733–34, 793

Load( ) method, 436–37, 446, 1069

LogMessage( ) method, 498

Load event handler, 437

LogonUser( ) function, 772

Load event, Page class, 77–78, 83, 87–88, 115,

LogoutAction property, 733

129, 203, 393, 397, 510–11, 518, 520,

LogoutImageUrl property, 733

550, 826, 1017, 1073

LogoutPageUrl property, 733

LoadControl, 518

LogOutputMessage( ) method, 1200–1201

LoadControlState( ) method, 918

LogoutText property, 733

loading user controls, dynamically, 518–21

Long Date data types, 340

overview, 518

loopback address, 235

portal frameworks, 519–21

 

LoadPostData method, 919

M

LoadViewState method, 917

machine.config file, 153, 160–62, 164, 183–84,

LoadXml( ) method, 437

218, 624, 628, 661, 695, 853, 883, 913,

Local Security Policy tool, 765

1171–72

<Localizable> attribute, 614

<machineKey> element, 160–62

 

1234 I N D E X

Macro Explorer, Visual Studio, 35 macros, Visual Studio 2005, 57–59 MailDefinition property, 739 MailWebEventProvider provider, 663 MajorVersion property, 912 managed application, 9, 11 managed code, 11

managed stored procedures, 233

MapPath( ) method, ServerUtility class, 92–93 MarkupName property, 1015

MARS (Multiple Active Result Sets), 233 Master directive, 539, 549

master key, 755 master pages, 17

applying through configuration files, 549 default content, 546

design-time quirks with, 543–45 dynamically setting, 552

and formatting, 549

interacting with master page class, 550–52 nesting, 552–54

overview, 525, 538–39 practical example, 546–47 and relative paths, 548–49 simple content page, 541–43 simple master page, 539–41

specifying titles and metatags for content pages, 550

Master property, Page class, 551 MasterPageFile attribute, 541, 549, 553 MasterPageFile property, 552 MasterType directive, 551

match-all updating, 273 MAX( ) function, 292–93, 420

Max Pool Size setting, Connection pooling, 238 maxCachedResults option, <roleManager>

configuration tag, 790 MaximumRowsParameterName property, 357,

359

MaxInvalidPasswordAttempts property, 720 maxIoThreads configuration, 625 maxPageStateFieldLength attribute, <pages>

element, 72 maxRequestLength setting, 651 maxWorkerThreads configuration, 625 MD5 hashing algorithm, 703 measurements. See Unit structure member list, 44

member variables, 156

membership. See also custom membership providers

and ASP.NET 2.0, 19–20 membership API

configuring connection string and membership provider, 718–19, 721

configuring forms authentication, 713–14 creating and authenticating users, 721, 723

creating data store, 714–18 overview, 709, 711–12

Membership class

creating and deleting users, 748 overview, 744–45

retrieving users from the store, 745, 747 updating users in the store, 747–48 validating users, 749

overview, 709

security controls. See also Login control ChangePassword control, 739–40 CreateUserWizard control, 740, 742–44 LoginStatus control, 733

LoginView control, 733–34 overview, 723–24 PasswordRecovery control, 735–39

<membership /> section, 711, 718–19 Membership API, 687, 691, 1045, 1050 Membership class, System.Web.Security

namespace, 710, 858, 876, 879, 881, 883, 887–89, 894, 896

Membership Service, 787 <membership> section, 723 MembershipCollection class, 747 MembershipCreateStatus class, 748

MembershipCreateUserException class, 710 MembershipProvider class, 711, 745, 869, 877 MembershipProviderCollection class, 711 MembershipUser class, 710–11, 720, 744,

747–48, 858, 860, 868–69, 881, 887 MembershipUserCollection( ) method, 888 MembershipUserCollection class, 710, 746, 888 memory, 4–5, 11, 67, 79, 153, 158, 203, 213–14,

216–17, 222, 243–44. See also garbage collection

memoryLimit configuration, 625 MemoryStream class, 498, 847

Menu control, 555, 569–70, 578, 598, 1052, 1070 menu templates, 596–98

overview, 592–95 styles, 595–96

MenuItem class, 592–93, 596–98 MenuItemClick event, Menu class, 593 MenuItemDataBound control, 578 MenuItemStyle class, 596

MenuStyle class, 596 MenuView control, 576 MergableProperty attribute, 944

MergeWith method, Style class, 938 Message class, 422

Message property, 737 message queues, 422–24

MessageName property, 1120, 1130 MessageQueue class, 422 MessageQueueCacheDependency class, 422 metacharacters, regular expressions, 139 meta:resourceKey attribute, 612, 614, 617

metadata, 11, 14, 550 Metadata property, 87

Microsoft Intermediate Language (MSIL) code, 8, 11

Microsoft Management Console (MMC), 718, 841

Microsoft.XMLHTTP class, 1118 Microsoft.XmlHttp control, 995 MigrateAnonymous event, 821 MIN( ) function, 292–93, 420

Min Pool Size setting, Connection Pooling, 238 MinFreeLocalRequestFreeThreads setting, 651 minFreeThreads setting, 651

MinorVersion property, 912 MinRequiredNonAlphanumericCharacters

property, 720 MinRequiredPasswordLength property, 720 MMC (Microsoft Management Console), 718, 841 mobile controls, 104–5

mobile devices, 14, 213

mode attribute, customErrors element, 166, 695 Mode property, 360

mode session state setting, 218–20 Mode setting, session state element, 217 modified URL (munged URL), 216, 221 modifiers. See regular expressions mostRecent option, 100

Move( ) method Directory class, 473 File class, 473

MoveNext property, 567 MoveTo( ) method

DirectoryInfo class, 475 FileInfo class, 475

MoveToFirstAttribute method, XPathNavigator class, 440

MoveToFirstChild method, XPathNavigator class, 440

MoveToNextAttribute method, XmlTextReader class, 445

mscorlib.dll assembly, 41 MSDN, 7, 190 MSDomVersion property, 912

MSIL (Microsoft Intermediate Language) code, 8, 11

MSN portal, 1043, 1045

MSXML, creating ASP client with, 1117–18 MSXML2.DOMDocument object, 1118 multibrowser, ASP.NET, 14

multidevice, ASP.NET, 14 Multilanguage, ASP.NET, 9, 11

Multiple Active Result Sets (MARS), 233 multiple attribute, Select element, 114 multiple users, making files safe for, 494–98

creating unique filenames, 494–97 locking file access objects, 497–98 overview, 494

I N D E X 1235

multiple views, web pages with MultiView control, 556–60 overview, 555–56

Wizard control events, 562–64 overview, 559–60 steps, 561–62

styles and templates, 564–67 multithreading, 11

MultiView control, 146, 556–60, 562, 598 munged URL, 216, 221

munged URL (modified URL), 216, 221 MySQL injection attacks, 250

N

name attribute, profile property, 810 Name method, *ProviderBase class, 830 name option, 696

Name property, 1032 DirectoryInfo class, 475 FileInfo class, 121, 475, 720 HtmlInputControl class, 108 IIdentity interface, 687 SqlRoleProvider provider, 790

<namespace> parameter, Wsdl.exe, 1108 namespaces, 7, 234

prefixes for, 430 XML, 429–30

name/value collection, HTTP headers, 90 NavigateUrl property, 147, 585–86, 593 navigating XML files. See reading and

navigating XML files navigation controls, 104 NavigationButtonStyle style, 564–65 NavigationStyle style, 565

nested controls, 85–86 nested grids, 458–59 nested transactions, 260

nesting master pages, 552–54

.NET classes, 900

.NET components, 177–82 creating component, 178 overview, 177

using component, 179–82

.NET development model

.NET language compilers, 24–25 overview, 24

Visual Studio IDE, 25–26

.NET Framework, ASP.NET integrated with, 7

.NET Framework Components tab, 904

.NET language compilers, 24–25

.NET standard, 514

Netcraft (Internet analysis company), 15 NetworkStream class, 847

New Project window, Visual Studio .NET, 26 New Web Site window, Visual Studio, 27

1236 I N D E X

NextButtonClick event, 563 NextPageImageUrl property, 360 NextPageText property, 360 NextPrevious mode, 360 NextPrevious property, 360 NextPreviousFirstLast property, 360

NextResult method, DataReader object, 242 NextSibling property, 576

NextView command, 558 NextViewCommandName field, 558 NodeIndent property, TreeView control, 589 <Nodes> section, 584

NodeSpacing property, 589

NodeStyle property, TreeView control, 590 NodeStyle style, 572

NodeTemplate template, 572

NodeType property, XmlNode object, 437, 440 nologo parameter, Wsdl.exe, 1108 nonhierarchical data binding, 453–55 NonSelectableDates collection, 962 NonSelectableDates property, 926, 958–60 NonSerialized attribute, 500

non-web-page resources, protecting adding file type mapping, 798–99 overview, 798

writing custom HTTP handler, 800–801 NotifyDependencyChanged( ) method,

CacheDependency class, 421–22 NotifyParentProperty attributes, 955 NotImplementedException class, 1162 NotSupportedException class, 409, 848 Now property, DateTime class, 706

NT LAN Manager (NTLM), 675, 687, 711, 755–56 null reference, 516, 522

NullDisplayText property, 338 NullReferenceException, 917 Numeric mode, 360 NumericFirstLast property, 360

O

obfuscators, 10 <object> tag, 988

ObjectCreating event, 326 ObjectDataSource, 419

custom pagination with, 357–60 data caching with, 409 handling extra options with, 334 overview, 323

selecting records, 324–25

using parameterized constructor, 325–26 using method parameters, 326–28

sorting with, 351–52 updating records, 328–29

updating with a data object

dealing with nonstandard method signatures, 330

handling identity values in inserts, 330–31 overview, 329

ObjectDataSourceSelectingEventArgs class, 327 ObjectDisposing event, 326

object-oriented programming, 1088–89 ODBC provider, 231–32, 234

off setting, 218 OldValuesParameterFormatString property,

SqlDataSource class, 320, 329, 386 OLE DB provider, 231–32, 251

onChange attribute, select element, 68 onClick attribute, 68, 921–22, 1005 OnClientClick property, 978

OnInit( ) method, DynamicPanel class, 906, 914, 917, 920, 925, 1004, 1062

OnLoad( ) method, 1066 OnPreRender( ) method, 999

OnPreRenderComplete( ) method, Page class, 314, 332

onSubmit attribute, 986 onUnload events, 979 Open( )method

connectionString object, 236–37 FileInfo class, 476

OpenMachineConfiguration( ), 169 OpenRead( )method, FileInfo class, 476 OpenText( ) method

File class, 489 FileInfo class, 476

OpenWebConfiguration( ) method, 169 OpenWrite( ) method, 476, 491

Operator property, CompareValidator control, 138

Oracle provider, 231–32, 234, 238–39 ORDER BY clause, 350, 352 <orderService> element, 173 osql.exe tool, 664, 717

output caching, 156–57, 522 cache profiles, 400–401 caching to disk, 401

custom caching control, 396–97 declarative output caching, 393–94 fragment caching, 398

with HttpCachePolicy class, 397–98 overview, 392–93

post-cache substitution, 398–400 and the query string, 394–95

with specific query string parameters, 395 OutputCache directive, 396–97, 399–401, 420,

522 <outputCacheProfiles> section, 400

Overline property, FontInfo class, 121 Owner member, WindowsIdentity object, 763

P

P switch, 715

Page class, 506. See also pages, ASP.NET accessing HTTP context in another class,

100–101

code-behind programming, 50 overview, 89

Request object, 89 Response object, 91 Server, 92–94

Session, Application, and Cache objects, 89 Trace, 95–98

Trace object, 96 User object, 94

Page directive, 49, 96, 536, 539, 541, 549–50, 617 page event handlers, 80

page flow example, 80–82

page framework initialization, 77 page header, 63, 86–87

page initialization, 511 page life cycle, 310 Page object, 550

page processing. See pages, ASP.NET Page property, Control class, 106 page variables, 50

Page_Load( ) method, 51 PageButtonCount property, 360

PageCatalogPart control, 1050–51, 1053, 1055, 1083

pageOutput option, 99 Page.Request.Browser.JavaScript property, 998 PagerSettings property, 356, 360

PagerStyle property, DataGrid controls, 356 PagerStyle style, 341

PagerTemplate mode, 362, 364 PagerTemplate template, 374 pages, ASP.NET. See web forms <pages> attribute, 549 <pages> element, 72, 536, 989

PageSize property, DataGrid controls, 356–57 paging, GridView

automatic, 355–57

custom pagination with ObjectDataSource, 357–60

customizing Pager bar, 360 overview, 355

PagingSettings property, 372 PagingStyle property, 372

PaintValue method, UI type editor, 963 Panel class, 1003

Panel control, 118, 387, 556, 618

PanelID property, DynamicPanelRefreshLink class, 1005

parameterized commands, 250–51

I N D E X 1237

Parent property Control class, 106

DirectoryInfo class, 475 HTML server controls, 106

ParenthesizePropertyName attribute, 944 ParentLevelsDisplayed property, 571 ParentNode property, 576 ParentNodeStyle property, 590 ParseChildren attributes, 958

partial caching (fragment caching), 392, 398, 522 partial classes, C# 2005, 16 PartialCachingControl object, 522

Passport authentication, 671, 676, 685 Passport .NET SDK, 685 PassportAuthenticationModule, 685, 687 PassportIdentity class, 687

<password> parameter, Wsdl.exe, 1108 PasswordAttemptWindow property, 720 PasswordFormat property, 720, 882–83 PasswordLabelText property, 727 PasswordRecovery control, 724

overview, 735–37 templates, 737–39

PasswordRecoveryIconUrl property, 728 PasswordRecoveryText property, 728 PasswordRecoveryUrl property, 728 PasswordRequiredErrorMessage property, 727 passwords

configuration, 625 hashing in web.config, 703

salted password hashes, 885–87 PasswordStrengthRegularExpression property,

720

path, system cache, 9 path attribute, 163–64, 185 Path class, 481–83

path option, 697

Path property, Request class, 584 PathDirection property, 571 paths, getting file path, 92 PathSeparator property, 571 PathSeparatorStyle style, 572

PathSeparatorTemplate template, 572 Pen object, 1024

pens, and dynamic graphics with GDI+, 1024, 1026

PenType member, 1024 Percentage data type, 340–41 performance

reusability of cached pages, 394 state management options, 196

period (.) character, XPath expression, 443 Perl, 4

permissions, 156, 474. See also security PersistChildren attribute, 932–33, 958 PersistenceMode attribute, 957–58 PersistenceMode.InnerProperty, 958