Build Your Own ASP.NET 3.5 Website Using C# & VB (120 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
12.33Mb size Format: txt, pdf, ePub

db_owners, 704

Departments,
159,
537

dbErrorLabel control,
399

adding many new to a database, 546

Debug toolbar,
217

data source,
512

debugging,
208

deleting,
545–547

executing a page with/without, 169

viewing with paging functionality
, 528

run-time error,
214

Departments page,
520–524

setting using Web.config,
172

storing in V
iew State, 528–530

stopping, 170

Departments table (employee database),

using a breakpoint in the code, 216

284,
287,
312

with Visual Web Developer
, 169,
212–

primary key
, 293

218

retrieving department names and their

decimal (C#),
56

ID, 314

Decimal (VB), 55,
56

Design button, 205

declaring a function,
63,
64

Design mode,
642,
645,
649

declaring an array
, 60

Design View,
163,
208,
378
,
398
,
404,

declaring an object,
77

447,
459,
460

default event handlers, 461

Design view,
491,
492,
615,
625
,
652

Licensed to [email protected]

717

DetailsView action types

working with, 612–615

and the events they trigger when

directories and directory information

clicked,
472

accessing,
596,
608–612

DetailsV
iew column, 504

Directories/Files,
609

DetailsView control,
370,
488,
645
,
646

Directory class, 608

adding a new employee, 505

DirectoryInfo class,
608

binding to SqlDataSource,
499–511

disabling

deleting properties from,
491

file sharing, 599

display modes, 476

disconnected data,
515

displaying lists, 511–514

disconnected data access,
515

Edit button, 469

display modes

entering edit mode, 473–477

DetailsV
iew control, 476

event handling, 469–485

Display property
, 237

in edit mode,
471
,
476

Display View
, 495

properties to set, 502

displaying data correctly,
551

recreating the columns, 502–503

displaying lists in DetailsView
, 511–514

skins in,
467

DisplayMode property
, 116

styling,
467–468

disposal of objects, 602

synchronization with GridView con
DISTINCT clause, 314–316

trol,
507

division operator (/),
326

updates and GridView control,
506

Do loop,
69

use with address book,
463
,
465–467

Do While loop, 71

using, 463–467

Document Object Model (DOM) scriptusing templates,
477–481

ing, 636

DetailsView events,
469–473

dog

DetailsView object

OOP example,
77–80

storing ID of the record,
484

Dorknozzle project, 158–160

DetailsView records

adding a foreign key
, 298

updating,
481–485

adding a skin, 200

using a stored procedure,
481

adding an employee help desk request

development languages, 42

web form,
209–211

Dim (dimension), 55

adding files,
194

directives, 27,
30

adding many new departments,
546

location on page,
30

address book,
447–451

types of,
30,
41

adding a new employee, 503,
505,

working with, 41

508

directories, 609

Licensed to [email protected]

718

displaying details about selected

preparing the sitemap, 194–196

rows,
463

relationships in employee records

displaying selected columns,
455

database,
300

highlighting selected fields,
460

starting,
193–208

paging,
498

styled address book, 457

showing DetailsView control,
468

styling web server controls,
199–200

updating employee's address and

updating employee directory using

city,
486

DataList, 418

viewing employee details,
469

updating Help Desk page,
256–261

applying the themes,
201

updating records, 395–410

building the master page,
202–205

using stored procedures,
414–415

connection string, 499

using the master page,
205–208

creating a company newsletter page,

using validation controls,
256–261

623–633

view the logged-in user sees, 590

creating a new style sheet, 197–198

Visual Web Developer Express,
699

creating a new theme folder,
196

web application, 161

creating employee directory,
376–415

welcome page,
208

creating the employees table,
280–283

drop-down list

creating the remaining tables, 283–285

created with data binding, 383

database diagrams, 294–296

selecting directories or files from,
609

deleting records, 410–414

DropDownList control, 72
,
105,
115,

Departments,
537

211,
382,
404
,
609
,
665

data source,
512

Dynamic mode (validation), 237

viewing with paging functionality,

528

E

Departments page,
524

e As EventArgs (VB),
51

employee records database,
265
, 268,

Edit button, 470,
471
,
477

270
,
273

Edit columns,
477

executing stored procedure, 343–346

Edit employee button, 431

extracting information from employEdit Fields,
477
,
512

ees database,
308

Edit link,
474

implementing relationships in employedit mode

ee database,
297–301

DetailsV
iew control, 471,
473–477

inserting records,
388–394

GridView control,
470,
473–477

login page,
555–557
,
589

Edit Templates,
439

populating the employee records

editing

database,
286–289

DataList items, 430–438

Licensed to [email protected]

719

field's properties,
478

viewing an employee in edit mode,

EditItemStyle, 443

438

emplate> template, 421,
430
, employee help desk request web form,

431,
479

209–211

EditRoleGroups, 593

employee ID, 361
,
362
,
366,
394,
404
, EditUpdate checkbox,
473

428

element type selectors,
150

invalid, 368

Else statement,
67

employee list, 360

email

in a drop-down,
403

company newsletter page, 623–633

employee table, 287

sending a test email,
621–623

creating, 280–283

sending with ASP.NET
, 619–633

extracting information from,
308

email address

referencing records from the Depart
invalid, 247

ments table, 293

embedded style sheets,
149

structure,
283

employee database, 265,
270
,
278

using Repeater control,
373–376

creating the employee table, 280–283

employeeDataSource, 509

creating the remaining tables, 283–285

employeeDetails for the ControlID, 646

entities, 273

employeesList control, 398

relational design concepts, 289–291

populating with list of employees

with Department ID field, 272

from database,
399–403

employee details, 407,
645

encryption,
552

adding a new employee, 504

asymmetric algorithms,
552

updating,
481

symmetric algorithms,
552

employee directory,
158
,
189,
420

Enforce Foreign Key Constraint,
303

completed page,
378

entities (tables),
270

creating, 376–415

Equals, 84

data binding, 381–388

error messages, 213,
214,
218,
220–221
,

deleting records, 410–414

651

hiding employee details,
423

invalid email address,
247

inserting records,
388–394

login failed error
, 356

showing employee ID,
428

validation errors,
246

styled list, 442

Event button,
482

updated using DataList,
419–420

event handler
, 46,
54

updating records, 395–410

event receiver,
82

using stored procedures, 414–415

event sender
, 82

EventArgs e (C#), 51

Licensed to [email protected]

720

EventName field,
646

File class, 596,
597

events,
46

file paths

(
see also
control events; page events)

working with, 612–615

naming using past and present tense,

file sharing

472

disabling,
599

triggered by DetailsView action types,

FileBytes property,
616

472

FileContent property,
616

triggered by GridView action types,

FileName property
, 616

471

files,
609

events (object), 76,
82

(
see also
text files)

"everything is an object", 83

editing in Source view,
163

Exception class

reading using StreamReader,
608

properties,
225

uploading, 615–619

Exception object, 225

uploading from client to server
, 596

exceptions,
214

using code-behind,
86–93

handling locally,
221–226

Filestream class,
596

Execute button, 310

FileUpload control,
133
,
615,
616,
665

ExecuteNonQuery method, 354,
388,
393

Fill method, 523

ExecuteReader method,
353,
355

filtering data, 542

ExecuteScalar method,
354

filtering groups, 336–337

executing a page

Finally block, 222,
223,
368
,
381

with debugging, 169

FindControl method, 428
,
484

without debugging, 169

FirstBulletNumber property
, 117

Exit (VB),
74

float data type, 275,
276

exiting loops prematurely,
74

floating point numbers,
54

expressions, 325

FLOOR function,
329

expressions (SQL),
325

font,
151

Extender W
izard, 649

FooterStyle, 443

external style sheets, 149

emplate> template, 372,
421

For Each loop, 69,
73

F

For loops,
69,
72,
75
,
213

fields

For Next loop,
69

choosing, 499

foreign keys, 291–292

fields (database),
265

adding to Dorknozzle database, 298

fields (object),
76

creating using database diagrams,
294

Other books

Sexier Side of the Hill by Victoria Blisse
Werewolves in Their Youth by Michael Chabon
Let the Devil Sleep by John Verdon
A Devil in the Details by K. A. Stewart
Under the Sign by Ann Lauterbach
Unforgettable Lover by Rosalie Redd
Touch by Graham Mort
Spiral by Andy Remic
Last Dragon Standing by G.A. Aiken