Build Your Own ASP.NET 3.5 Website Using C# & VB (119 page)

Read Build Your Own ASP.NET 3.5 Website Using C# & VB Online

Authors: Cristian Darie,Zak Ruvalcaba,Wyatt Barnett

Tags: #C♯ (Computer program language), #Active server pages, #Programming Languages, #C#, #Web Page Design, #Computers, #Web site development, #internet programming, #General, #C? (Computer program language), #Internet, #Visual BASIC, #Microsoft Visual BASIC, #Application Development, #Microsoft .NET Framework

BOOK: Build Your Own ASP.NET 3.5 Website Using C# & VB
2.41Mb size Format: txt, pdf, ePub

selecting case, 68

661

Cassini,
169

Click event handler
, 103,
232,
234,
259,

permissions,
597

362,
364,
390
,
404

Catch block, 222,
223
,
224
,
225,
370,

Click subroutine,
92

381
,
406

client-side technologies, 2

error message, 391

client-side validation, 228,
229

Category drop-down list, 382

advantages/disadvantages, 228

CausesValidation,
236

and ASP
.NET 2.0, 231

CC (email messages),
620

of user input, 550

CEILING function,
329

ClientValidationFunction proprety,
252

ChangeExtension method,
614

code-behind files,
86–93,
138,
163

ChangeMode method, 476

separation of presentational elements

ChangePassword control,
586

(controls) and your code,
86

char (C#),
56

code declaration blocks,
27,
30–32

Char (VB), 56

code within,
33

CHARINDEX function,
331
,
332

comments in VB and C# code, 31–32

CheckBox control,
111,
116,
663

language attribute,
32

CheckBoxField column, 458

src attribute,
32

CheckBoxList control, 115,
116
,
663

Code Editor
, 163–165

CheckChanged event, 111
,
112

code render blocks, 27
,
33–34,
86

CheckUniqueUserName method, 252

types of,
33

child tag, 371,
372

CodePlex web site, 702

CircleHotSpot control,
112

collections,
178

City field, 479

colour setting, 169

class attribute (style), 151

column controls,
454
,
458

classes,
76
,
80

column headers,
453,
454

access modifiers,
81

ColumnNameSortOrder,
537

definition,
76

columns,
265,
311

for working with directories,
596
, 608

adding, 459

for working with files,
596

adding new,
504

for working with streams, 596

choosing,
493

Licensed to [email protected]

713

customizing in GridView,
453–454

Content control, 146

displaying selected,
455

ContentLength, 616

filtering table, 453

ContentPlaceHolder
, 207

properties, 276–278

ContentPlaceHolder control, 143
,
146
, read-only,
479

147

Combine method, 614

tags,
640

combining lines of code, 67

ContentT
ype, 616

CommandField column, 458,
473

control binding,
382

company newsletter page

Control class, 84

creating, 623–633

control events,
46–51

CompareV
alidator control, 240–243,
679

subroutines,
50–51

difference from RequiredFieldValidatControl Toolkit

or control, 241

ASP.NET AJAX,
648–655

example, 241

ControlID,
646

for data type checks, 242

ControlID field,
646

to compare value of control to a fixed

ControlToCompare property
, 241

value, 241

ControlToValidate property,
239
,
241

values,
242

Convert this field into a TemplateField

compilation errors, 218

link,
477,
478

conditional logic, 67–69

Convert to T
emplate option, 588

conditionals,
67

cookieless attribute,
561

configuration errors,
218

cookies, 191–193

configuration file

creating, 193

elements,
174

Copy Website tool,
698,
700

configuration section groups,
174

COUNT function,
334

configuration section handler declaraCreate code in a separate file checkbox,

tions, 176

624

configuration sections, 175

CREATE PROCEDURE,
342
,
344

configuration settings,
175

CreateText method,
602,
603,
604

ConfigurationManager class, 381,
578

CreateUserW
izard control, 586

Configure Data Source, 492,
499
,
511

creating users and roles,
579–580

connection string, 351
,
352
,
380,
520,

tag, 564
,
565

602

CSS,
636
(
see
Cascading Style Sheets)

in Web.config,
380

CssClass property,
152–154

specifying,
492
,
499

current databases,
269

constraints,
279

custom errors, 220–221

constructors, 80

customErrors,
220

Licensed to [email protected]

714

CustomValidator control,
249–252,
680

data source controls,
488–515

binding the DetailsView to SqlData
D

Source, 499–511

data

binding the GridView to a SqlDatafiltering,
542

Source, 490–498

reading (ADO.Net),
359–360

displaying lists in DetailsView,
511–

updating, 543

514

data access code

in the Visual Web Developer’s Toolbulletproofing,
368–370

box, 489

data adapters, 518

data store

data binding, 371,
381–388
,
426

customizing,
571

and sorting,
537

Data tab,
489
,
491

DataSet to GridV
iew control, 530

data tables

DefaultView does not apply when

in ADO.NET 2.0 and later versions,

binding to a DataSet, 531

519

DetailsView to a SqlDataSource,
499–

populating,
286–289

511

data types, 55
,
56,
275–276

for creating drop-down lists, 383

aliases, 56

GridV
iew to a SqlDataSource, 490–498

avoid mixing of,
57

implementing sorting, 530–542

converting from one type to another,

data consumer,
381

57

data key,
464

database,
349

Data Lists, displaying content using,

adding stored procedures, 414–415

417–443

column properties,
276–278

data readers,
515,
516

creating, 266–269

disadvantages,
516

using SQL Server Management

retrieving data using,
517

Studio, 268–269

data sets,
516

using Visual Web Developer,
267

advantages over data readers,
517

deleting records, 410–414

breaking ties to data source, 517

inserting records,
388–394

component parts,
518–519

primary keys,
278–280

memory and resource requirements,

setting the owner
, 358

516

updating from a modified DataSet,

shared among multiple requests,
516

543–547

storing in View State,
528–530

updating records, 395–410

data source,
381

what is it?,
264–266

testing,
494

Licensed to [email protected]

715

database authentication

relationships between tables, 272,

setting up,
356–358

301–305

database connection

Databases node, 269

defining,
351–352

DataBind method, 611

database design,
270–271

DataColumn class,
518

and implementation,
272

DataField property,
454

delete anomaly,
271

DataKeyNames property,
465

logical design,
270
,
273

DataList control,
370,
417

overcoming problems,
271

and Visual Web Developer
, 439–440

physical design, 270

basics, 418–421

relational database concepts,
289–305

generation of ItemCommand event,

update anomaly,
271

424

database diagrams, 294–296

handling buttons within their temadding support for
, 294

plates,
422,
424,
428

adding tables to, 295

smart tag, 439

and table relationships, 301–305

style elements, 442

to create foreign keys,
294

styling,
441–443

to provide visual representation of

versus Repeater control, 420

tables in the database,
294

DataList events,
422–430

visualizing data tables using, 297

using controls within,
428

zooming feature, 296

DataList items

Database Diagrams node, 294

editing,
430–438

Database Engine Query,
309,
414

DataList templates,
421
,
430–439

Database Explorer,
280
,
283

building visually
, 439

Database field,
572

DataRelation class,
518

Database name field,
269

DataRow class,
518

database normalization, 274

DataSet class,
488
,
514,
518

database protection,
550

DataSet mode,
514

Database Publishing Wizard,
702

DataSet object,
515
,
523

database server,
264

DataSets

database tables, 265

adding DataTable to,
523

creating, 269–274
,
283–285

binding to controls,
519–525

for storing lists of categories and subdifference from databases,
519

jects,
382

filling with data,
523

inserting data and identity columns,

structure,
519

286

updating a database,
543–547

populating, 286–289

Datasheet View
, 286

Licensed to [email protected]

716

DataSource,
611

DEFAUL
T property (columns), 277

DataSourceMode,
514

default validation groups, 255

DataT
able class, 488
,
518

default web browsers, 170

DataTable object,
515

default web form,
162

in ADO.NET 2.0, 519

Default.aspx,
162
,
163

DataTables,
525

deleting,
205

displaying data from in a GridView,

editing,
164

525

viewing, 164

DataTypeCheck,
243

DefaultView

DataV
iew class, 488,
518
,
542

does not apply when binding to a

DataV
iew object, 515,
532

DataSet,
531

sorting parameters, 532

Delete Employee button,
411
,
412

DATEADD function,
332

DELETE query,
411,
500

DATEDIFF function,
332

DELETE statement, 340–341

date-of-birth text box,
242,
244

DeleteCommand property
, 543

DATEP
ART function, 333

deleting database records,
410–414

dates

deleting records, 341

specifying,
243

denying user access,
562
,
563,
564,
583

datetime data type, 275

Department drop-down list,
511

DA
Y function, 333

Department ID TemplateField,
512

Other books

Louisa Neil by Bete Noire
Chinese Handcuffs by Chris Crutcher
A Perfect Chance by Becca Lee
Breaker by Richard Thomas
Ground Truth by Rob Sangster
Developed by Lionne, Stal