Intro to ASP.NET MVC 4 with Visual Studio - Beta.pdf
(
4507 KB
)
Pobierz
Intr
Visu
ro to
ual S
o ASP
Studio
P.NET
o (Be
T MV
eta)
VC 4 w
with
Rick A
Anderso
on and S
Scott Ha
anselma
an
Summa
applicat
version o
ry
: This tuto
ion using M
of Microsof
orial will te
Microsoft Vi
ft Visual Stu
ach you the
isual Studio
udio.
e basics of
o 11 Express
building an
s Beta for W
n ASP.NET M
Web, which
MVC Web
is a free
Categor
Applies
Source
:
E-book
115 pag
ry:
Step-By
to
: ASP.NE
ASP.NET si
publicatio
es
-Step
ET MVC 4 B
te (
link to s
on date
: Ma
eta, Visual
source cont
ay 2012
Studio 11 B
tent
)
Beta
Copyright © 2012 by Microsoft Corporation
All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means
without the written permission of the publisher.
Microsoft and the trademarks listed at
http://www.microsoft.com/about/legal/en/us/IntellectualProperty/Trademarks/EN-US.aspx
are trademarks of the
Microsoft group of companies. All other marks are property of their respective owners.
The example companies, organizations, products, domain names, email addresses, logos, people, places, and events
depicted herein are fictitious. No association with any real company, organization, product, domain name, email address,
logo, person, place, or event is intended or should be inferred.
This book expresses the author’s views and opinions. The information contained in this book is provided without any
express, statutory, or implied warranties. Neither the authors, Microsoft Corporation, nor its resellers, or distributors will
be held liable for any damages caused or alleged to be caused either directly or indirectly by this book.
Contents
Getting Started........................................................................................................................................ 3
What You'll Build
........................................................................................................................... 3
Skills You'll Learn
........................................................................................................................... 5
Getting Started
.............................................................................................................................. 6
Creating Your First Application
.................................................................................................... 7
Adding a Controller
............................................................................................................................ 13
Adding a View
..................................................................................................................................... 20
Changing Views and Layout Pages
............................................................................................ 25
Passing Data from the Controller to the View
........................................................................... 31
Adding a Model
.................................................................................................................................. 37
Adding Model Classes
................................................................................................................. 37
Creating a Connection String and Working with SQL Server LocalDB
.................................... 41
Accessing Your Model's Data from a Controller
............................................................................... 43
Creating a Movie
......................................................................................................................... 46
Examining the Generated Code
.................................................................................................. 48
Strongly Typed Models and the @model Keyword
.................................................................. 49
Working with SQL Server LocalDB
............................................................................................. 53
Examining the Edit Methods and Edit View
...................................................................................... 58
Processing the POST Request
..................................................................................................... 65
Adding a Search Method and Search View
............................................................................... 67
Displaying the SearchIndex Form
............................................................................................... 67
Adding Search by Genre
............................................................................................................. 77
Adding Markup to the SearchIndex View to Support Search by Genre
.................................. 79
Adding a New Field to the Movie Model and Table
......................................................................... 80
Adding a Rating Property to the Movie Model
......................................................................... 80
Managing Model and Database Schema Differences
............................................................... 82
Automatically Re-Creating the Database on Model Changes
.................................................. 85
Adding Validation to the Model
........................................................................................................ 95
Keeping Things DRY
.................................................................................................................... 95
Adding Validation Rules to the Movie Model
........................................................................... 95
Validation Error UI in ASP.NET MVC
.......................................................................................... 97
How Validation Occurs in the Create View and Create Action Method
................................ 100
Adding Formatting to the Movie Model
.................................................................................. 108
Examining the Details and Delete Methods
.................................................................................... 111
Examining the Details and Delete Methods
............................................................................ 111
Wrapping Up
............................................................................................................................. 113
Plik z chomika:
ferdekiepski
Inne pliki z tego folderu:
656949ebook.pdf
(21575 KB)
Configure Kerberos Authentication for SharePoint 2010 Products.pdf
(22619 KB)
693616ebook.pdf
(2572 KB)
AGM_BitLocker_Administration_and_Monitoring_1.0.pdf
(1593 KB)
AGM_Application_Virtualization_(App-V)_5.0.pdf
(1605 KB)
Inne foldery tego chomika:
Zgłoś jeśli
naruszono regulamin