没有合适的资源?快使用搜索试试~ 我知道了~
首页C# 2010入门:ASP.NET 4基础之旅
C# 2010入门:ASP.NET 4基础之旅
需积分: 9 1 下载量 34 浏览量
更新于2024-07-29
收藏 21.12MB PDF 举报
"《开始掌握ASP.NET 4与C# 2010:专家视角》是一本由Matthew MacDonald撰写的专业书籍,针对.NET开发者的入门指南。该书旨在帮助读者从基础入手,深入理解并学习如何构建ASP.NET 4网站。作为第四版的教程,它紧跟技术的步伐,利用C# 2010语言的新特性和框架,为读者提供了一个实用且全面的学习路径。
本书强调了实践的重要性,通过详细的步骤和实例,引导读者掌握ASP.NET的核心概念,如Web Forms、AJAX、数据绑定、路由和控制器设计。在内容上,读者可以了解到如何创建动态网页,处理用户输入,管理数据库连接,以及实现前后端交互。此外,书中还涵盖了.NET 4的新特性,如依赖注入、面向切面编程(AOP)和WCF服务,帮助开发者提升应用程序的性能和可维护性。
版权方面,本书享有Matthew MacDonald的完全著作权,未经许可,任何形式的复制或传播都必须得到出版商的书面授权。书本提供了纸质版和电子版两种版本的ISBN号,以适应不同阅读需求。同时,作者尊重商标法规,在书中仅以编辑方式提及商标名、标志和图像,不构成侵权。
《开始ASP.NET 4 in C# 2010》适合那些希望系统学习ASP.NET开发的初学者,也适合有一定经验但想进一步提升技能的开发人员。无论你是希望构建企业级应用还是个人项目,这本书都是一个宝贵的资源,能够帮助你快速掌握ASP.NET 4平台的精髓,开启你的.NET开发之旅。"
■ CONTENTS
xiv
Applying Style Sheet Rules.................................................................................................................380
Themes ........................................................................................................................383
How Themes Work .............................................................................................................................383
Applying a Simple Theme...................................................................................................................385
Handling Theme Conflicts...................................................................................................................386
Creating Multiple Skins for the Same Control ....................................................................................388
More Advanced Skins.........................................................................................................................389
Master Page Basics .....................................................................................................391
A Simple Master Page and Content Page ...........................................................................................392
How Master Pages and Content Pages Are Connected ......................................................................396
A Master Page with Multiple Content Regions ...................................................................................398
Default Content...................................................................................................................................401
Master Pages and Relative Paths .......................................................................................................402
Advanced Master Pages ..............................................................................................403
Style-Based Layouts...........................................................................................................................403
Code in a Master Page........................................................................................................................408
Interacting with a Master Page Programmatically .............................................................................409
The Last Word..............................................................................................................410
■ Chapter 13: Website Navigation.......................................................................411
Site Maps.....................................................................................................................411
Defining a Site Map ............................................................................................................................412
Seeing a Simple Site Map in Action....................................................................................................416
Binding an Ordinary Page to a Site Map.............................................................................................416
Binding a Master Page to a Site Map .................................................................................................418
Binding Portions of a Site Map ...........................................................................................................420
The SiteMap Class ..............................................................................................................................425
URL Mapping and Routing ...........................................................................................427
URL Mapping ......................................................................................................................................428
URL Routing........................................................................................................................................428
■ CONTENTS
xv
The SiteMapPath Control .............................................................................................430
Customizing the SiteMapPath ............................................................................................................431
Using SiteMapPath Styles and Templates..........................................................................................432
Adding Custom Site Map Information.................................................................................................434
The TreeView Control...................................................................................................435
TreeView Properties ...........................................................................................................................436
TreeView Styles ..................................................................................................................................438
The Menu Control ........................................................................................................442
Menu Styles........................................................................................................................................444
Menu Templates.................................................................................................................................445
The Last Word..............................................................................................................448
Part 4: Working with Data ....................................................................................449
■ Chapter 14: ADO.NET Fundamentals ................................................................451
Understanding Databases............................................................................................451
Configuring Your Database ..........................................................................................453
SQL Server Express ............................................................................................................................453
Browsing and Modifying Databases in Visual Studio .........................................................................454
The sqlcmd Command-Line Tool........................................................................................................457
SQL Basics...................................................................................................................458
Running Queries in Visual Studio .......................................................................................................459
The Select Statement .........................................................................................................................461
The SQL Update Statement.................................................................................................................463
The SQL Insert Statement...................................................................................................................465
The SQL Delete Statement..................................................................................................................465
The Data Provider Model .............................................................................................466
Direct Data Access ......................................................................................................467
Creating a Connection ........................................................................................................................469
The Select Command .........................................................................................................................475
The DataReader..................................................................................................................................476
■ CONTENTS
xvi
Putting It All Together.........................................................................................................................476
Updating Data.....................................................................................................................................481
Disconnected Data Access ..........................................................................................491
Selecting Disconnected Data..............................................................................................................492
Selecting Multiple Tables ...................................................................................................................494
Defining Relationships........................................................................................................................495
The Last Word..............................................................................................................498
■ Chapter 15: Data Binding .................................................................................499
Introducing Data Binding .............................................................................................499
Types of ASP.NET Data Binding..........................................................................................................500
How Data Binding Works....................................................................................................................500
Single-Value Data Binding ...........................................................................................500
A Simple Data Binding Example .........................................................................................................501
Simple Data Binding with Properties..................................................................................................504
Problems with Single-Value Data Binding..........................................................................................505
Using Code Instead of Simple Data Binding .......................................................................................506
Repeated-Value Data Binding......................................................................................506
Data Binding with Simple List Controls ..............................................................................................507
A Simple List Binding Example...........................................................................................................508
Strongly Typed Collections .................................................................................................................509
Multiple Binding..................................................................................................................................510
Data Binding with a Dictionary Collection ..........................................................................................512
Using the DataValueField Property .....................................................................................................513
Data Binding with ADO.NET ................................................................................................................514
Creating a Record Editor.....................................................................................................................516
Data Source Controls...................................................................................................521
The Page Life Cycle with Data Binding...............................................................................................523
The SqlDataSource .............................................................................................................................523
Selecting Records...............................................................................................................................525
Parameterized Commands .................................................................................................................527
■ CONTENTS
xvii
Handling Errors...................................................................................................................................532
Updating Records ...............................................................................................................................533
The Last Word..............................................................................................................537
■ Chapter 16: The Data Controls .........................................................................539
The GridView................................................................................................................539
Automatically Generating Columns ....................................................................................................540
Defining Columns ...............................................................................................................................542
Formatting the GridView..............................................................................................546
Formatting Fields................................................................................................................................546
Using Styles........................................................................................................................................547
Formatting-Specific Values ................................................................................................................550
Selecting a GridView Row............................................................................................552
Adding a Select Button .......................................................................................................................553
Using Selection to Create Master-Details Pages ................................................................................554
Editing with the GridView ............................................................................................556
Sorting and Paging the GridView.................................................................................559
Sorting ................................................................................................................................................559
Paging.................................................................................................................................................561
Using GridView Templates...........................................................................................563
Using Multiple Templates ...................................................................................................................565
Editing Templates in Visual Studio .....................................................................................................566
Handling Events in a Template ...........................................................................................................567
Editing with a Template......................................................................................................................568
The DetailsView and FormView ...................................................................................573
The DetailsView ..................................................................................................................................573
The FormView.....................................................................................................................................575
The Last Word..............................................................................................................578
■ Chapter 17: Files and Streams.........................................................................579
Files and Web Applications..........................................................................................579
■ CONTENTS
xviii
File System Information...............................................................................................580
The Path Class....................................................................................................................................581
The Directory and File Classes ...........................................................................................................582
The DirectoryInfo and FileInfo Classes ...............................................................................................587
The DriveInfo Class.............................................................................................................................589
A Sample File Browser .......................................................................................................................590
Reading and Writing with Streams..............................................................................594
Text Files ............................................................................................................................................594
Binary Files.........................................................................................................................................596
Shortcuts for Reading and Writing Files.............................................................................................597
A Simple Guest Book ..........................................................................................................................598
Allowing File Uploads ..................................................................................................604
The FileUpload Control .......................................................................................................................604
The Last Word..............................................................................................................607
■ Chapter 18: XML...............................................................................................609
XML Explained .............................................................................................................609
Improving the List with XML...............................................................................................................611
XML Basics .........................................................................................................................................612
Attributes............................................................................................................................................613
Comments ..........................................................................................................................................614
The XML Classes..........................................................................................................615
The XML TextWriter ............................................................................................................................615
The XML Text Reader..........................................................................................................................618
Working with XML Documents in Memory .........................................................................................623
Reading an XML Document ................................................................................................................628
Searching an XML Document .............................................................................................................631
XML Validation.............................................................................................................632
XML Namespaces ...............................................................................................................................632
XML Schema Definition ......................................................................................................................635
Validating an XML Document..............................................................................................................637
剩余1016页未读,继续阅读
2013-08-05 上传
2010-07-14 上传
2010-05-22 上传
2013-12-01 上传
2010-06-06 上传
2012-10-15 上传
338 浏览量
2024-12-25 上传
zanxiaofeng
- 粉丝: 0
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Android应用源码利用poi将内容填到word模板-IT计算机-毕业设计.zip
- mdi-es:材料设计图标导出为ES模块
- LocationSearch
- 行业文档-设计装置-一种利用浸胶纸作为过渡联接体的胶合板.zip
- ImageProcessingApp:使用流行的MVC架构的图像处理应用程序
- hideandseek:Hide & Seek 是一款开源的多人在线街机游戏,对抗两支捉迷藏者团队,玩法有趣快节奏。 项目已从 https 移出
- angular-first-app
- 数据库课程设计-家庭理财管理.zip
- MochaBabelCoverage:一个 Mocha 运行器,支持对包含 JSX 的文件运行 Mocha,并支持覆盖率报告
- 脑机接口BCI-eeglab安装包
- grantwforsythe.github.io
- 性能测试工具LoadRunner书籍(14本)目录知识点(思维导图加图).rar
- ArgRouter:为js函数添加重载功能
- 2D形状
- android应用源码合肥工业大学客户端源码-IT计算机-毕业设计.zip
- PdfFormFillerUTF-8:带有命令行或 WWW 界面的简单 PDF Form Filler 实用程序。-开源
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功