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

314–316

with parameterized DELETE query,

411

Licensed to [email protected]

734

with parameterized INSERT query,

Standard table view
, 296

389

standard web controls, 659–678

with parameterized UPDATE query,

standard web server controls,
106–115

396

Start Page, 163

SqlCommand object comm

static method,
602

ExecuteCommand method, 355

Static mode (validation), 237

SqlCommandBuilder object,
543,
545

StaticItemTemplate,
204

SqlConnection class, 348

stored procedure

SqlConnection object conn

basic form, 342

Close method, 355

example, 342–346

Open method, 355

for DetailsView records,
481

SqlDataAdapter,
544

stored procedures,
341–346

Update method, 543
,
545

use with employee directory,
414–415

SqlDataAdapter class, 488,
518,
520

StreamReader

SqlDataAdapter object, 515,
523,
545

reading files using,
608

properties,
543

StreamReader class, 596

SqlDataReader class,
348
, 376,
377,
445,

StreamReader object, 604
,
606
,
607

446
,
447,
489

StreamWriter class,
597

Read method,
359,
360

StreamWriter object,
601,
604

SqlDataReader object,
353
,
514

string (C#), 56

advantages/disadvantages, 487

String (VB),
55,
56
,
64

alternatives to, 488

string concatenation operator
, 67

SqlDataSource object,
488
,
489
,
511

string functions,
330–332

advantages/disadvantages, 514–515

string variables,
606

binding to DetailsView,
499–511

strings, 54
,
57,
58

binding to GridView
, 490–498

converting numbers to,
64

generating INSERT, UPDATE and

strongly-typed languages,
57

DELETE statements, 500,
510

Structured Query Language (
see
SQL)

use with address book,
494

style attribute,
150

SqlException class, 226

Style Builder tool,
198

SQRT function, 330

style properties,
151

square root function, 330

style rules,
149

Src, 141

inline,
150

src attribute, 32

Style Sheet template,
197

StackTrace property
, 226

style sheets, 148

Standard tab

creating, 197–198

T
oolbox, 615

embedded, 149

Licensed to [email protected]

735

external,
149

System.Configuration namespace, 381

styled address book,
457

System.Data.SqlClient namespace, 348

styles

System.IO namespace,
595
,
600
,
608
, 612

classes, 151

groups of classes,
596

CssClass property
, 152–154

System.Net.Mail namespace, 596,
619

editing,
198

System.W
eb.Security namespace, 554

element type selectors,
150

System.Web.UI.HtmlControls

inline,
150

namespace, 98

styling the DataList, 441–443

System.Web.UI.MasterPage class,
143

styling the DetailsView,
467–468

System.Web.UI.Page class,
97

styling the GridView with templates,

System.Web.UI.UserControl class,
134,

skins and CSS,
454–458

136

Sub (VB),
51,
61

System.Web.UI.W
ebControls class, 85

subclass

System.Web.UI.WebControls namespace,

deriving,
82

107

Subject (email messages), 620

System.W
indows.Forms namespace, 107

Subject drop-down list, 382

Submit button,
230
,
232,
235,
245

T

Submit Request button, 259
,
386
,
389,

table joins,
312,
323–325

390,
394,
650
,
652

table relationships

submitButton_Click method,
233,
260,

and diagrams, 301–305

394,
415

creating and visualizing,
300

subqueries,
323

many-to-many relationships,
304–305

subroutines, 46–51
,
78

one-to-many relationships, 302–304

components,
50

one-to-one relationship,
301

numbers of parameters, 64

Table View,
296

page events,
52

tables

web control,
50–51

querying, 312

SUBSTRING function, 331
,
332

tables (databases),
265

subtraction operator (-),
326

T
agName, 140

SUM function, 337

TagPrefix,
140

survey form

TargetSite property,
226

HTML server control example, 99–104

template styles

switch (C#),
68,
69

designed through CSS, 455

switch statements,
610

in GridView
, 454

SwitchPage event handler
, 132

TemplateControl class,
84

system databases,
269

TemplateField column,
459
,
479,
481

Licensed to [email protected]

736

templates

Timeout property
, 188

access to controls within, 422

T
imer control, 638,
695

DataList control,
421
,
430–439

T
o (address in email message), 620

Repeater control,
372

T
oolbox, 167
,
180

using in DetailsView,
477

collapsed tabs,
167

using in GridView
, 477–481

controls,
168

terminating a loop,
74

Login tab, 568

ternary operator,
506

Standard tab,
167,
615

test query

Validation tab,
238

for our data source, 501

TOP keyword,
321

Test Query button,
494
,
500

ToString,
84

text

transact-SQL functions, 328

placement inside a web form, 105

arithmetic functions,
329–330

text box,
105

data and time functions, 332–333

adding to a web form,
105

string functions,
330–332

text files,
595

working with groups of values,
333–

(
see also
files)

338

reading content from a, 604–607

TreeV
iew control, 127–129,
131
,
204

reading from, 596,
604–607

events,
693

setting up permissions, 597–599

methods,
693

writing content to a, 600–604

properties, 690–693

writing to, 595,
600–604

triggers

Text property
, 105
,
108
,
136

to update an UpdatePanel, 643–647

TextBox,
167

Triggers,
646

for username and password,
559

Try block,
222
,
223
,
224,
370,
394

TextBox control,
108
, 136
, 479,
603,
625
, T
ry-Catch-Finally blocks, 368,
370,
387
,

673

388

TextBox controls,
479

Try-Catch-Finally construct,
214
, 223

widening,
479

syntax,
221

TextBox web server control,
105
,
106

TextMode property,
108

U

theme folder

unauthenticated users (
see
anonymous

cerating,
196

users)

themes, 148,
196,
201

underscore operator (_), 327

Thread class, 641

Update button,
404
,
477

Throw keyword,
223

Update Employee button,
406–410
, 411–

timeout attribute,
561

414

Licensed to [email protected]

737

Update Item button,
433,
434–437
,
438

username, 592

Update link,
481,
506

editing,
439

Update method,
543
,
545

entering, 559

UPDATE query
, 396
,
410
,
500

SQL Server
, 356

UPDATE statements,
339–340

storage in authentication ticket,
560

syntax, 339

verification, 560

updateButton control,
399

usernames

UpdateCommand property,
543

security,
553

UpdateEmployee stored procedure,
437

users,
3

UpdateEmployeeDetails,
481

anonymous,
563,
583

UpdateItem method, 436–437

authenticating,
587

UpdatePanel, 643–647

creating, 579–580

using triggers to update, 643–647

loging out,
567

UpdatePanel control,
638–643,
644
, 647
, storing in W
eb.config file, 564

695

Users role

UpdatePanelAnimationExtender
, 655

assigning, 582

UpdateProgress control,
638
,
640,
641,

using (C#), 85

642,
654,
696

Using construct,
601,
606

updating database records, 395–410

using statements, 165

use WHERE statement,
396

updating DetailsView records,
481–485

V

updating existing data,
338–341

validating user input,
550

Upload button, 618

validation controls, 227–262
,
550,
649–

uploading files, 615–619
,
645

652,
678–684

uploading files from the client to the

CompareValidator
, 240–243

server,
596

CustomValidator
, 249–252

UPPER function,
330

RangeValidator,
243–244

uppercase, 330

RegularExpressionValidator,
246–249

user access

RequiredFieldValidator,
239–240

denying/allowing,
562
,
583

using,
238–252

setting individual rules,
585

ValidationSummary,
244–246

user accounts, 557

validation errors,
246

user display

validation groups, 252–255

customizing,
589–593

default,
255

User instance databases, 570

Validation tab,
238

user interaction

ValidationExpression,
247

with web application, 3

ValidationGroup property,
253

Licensed to [email protected]

738

ValidationSummary control,
244–246,

writing content to a text file, 600

683

VB.NET,
16,
19

ValidatorCallout,
648

VB.NET code (
see
VB)

ValidatorCalloutExtender
, 653

View Code,
163

ValidatorCalloutExtender Control ExV
iew Log button, 700

tender
, 649–652

View More details button,
422
, 427,
428
, Value property,
109

430

variable declarations,
55

view state,
34,
37–41

variables, 54

data persistence, 38

data types,
55
,
56

disabling,
41,
430

Other books

Etchings of Power (Aegis of the Gods) by Simpson, Terry C., Wilson-Viola, D Kai, Ordonez Arias, Gonzalo
Mount! by Jilly Cooper
The Cowboy SEAL by Laura Marie Altom
Be Sweet by Diann Hunt
Back to Reality by Danielle Allen
Was it Good for You Too? by Naleighna Kai