Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2016, Mike Murach & Associates, Inc.

Similar presentations


Presentation on theme: "© 2016, Mike Murach & Associates, Inc."— Presentation transcript:

1 © 2016, Mike Murach & Associates, Inc.
Chapter 25 © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

2 © 2016, Mike Murach & Associates, Inc.
Objectives © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

3 © 2016, Mike Murach & Associates, Inc.
Objectives (cont.) © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

4 © 2016, Mike Murach & Associates, Inc.
The MVC design pattern © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

5 © 2016, Mike Murach & Associates, Inc.
The MVC Components © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

6 © 2016, Mike Murach & Associates, Inc.
The benefits of MVC © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

7 The Shopping Cart as an MVC application
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

8 The pages in the Cart application and the concepts they illustrate
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

9 A procedure for creating an MVC application
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

10 © 2016, Mike Murach & Associates, Inc.
The New ASP.NET Project dialog box for starting an ASP.NET MVC application © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

11 The initial folders and files produced by the MVC template
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

12 Some of the folders and files created by default
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

13 ASP.NET MVC view engines
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

14 © 2016, Mike Murach & Associates, Inc.
The Razor view engine © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

15 © 2016, Mike Murach & Associates, Inc.
Razor syntax examples © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

16 The default RegisterRoutes method in the RouteConfig.cs file
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

17 © 2016, Mike Murach & Associates, Inc.
The Models folder © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

18 © 2016, Mike Murach & Associates, Inc.
The Cart model © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

19 © 2016, Mike Murach & Associates, Inc.
The Cart view model © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

20 The Controllers folder and the Add Scaffold dialog box
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

21 © 2016, Mike Murach & Associates, Inc.
How to add a controller © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

22 © 2016, Mike Murach & Associates, Inc.
The Home controller © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

23 The Views folder and the Add View dialog box
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

24 How to add a view to an application
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

25 The _Layout.cshtml file
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

26 The _Layout.cshtml file (cont.)
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

27 The _Layout.cshtml file (cont.)
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

28 A regular view: Home/Index
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

29 The HomeController Index action method
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

30 The Home/Index.cshtml view
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

31 A strongly-typed view: Home/Contact
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

32 The HomeController Contact action method
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

33 The Home/Contact.cshtml view
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

34 © 2016, Mike Murach & Associates, Inc.
Common HTML helpers © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

35 A form element with a drop-down list using traditional HTML and Razor
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

36 A text box and a hidden field using traditional HTML and Razor
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

37 Redirection in a view using the Html.ActionLink helper method
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

38 Redirection in a controller using the Redirect methods
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

39 Three examples of redirection in controllers
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

40 The Post-Redirect-Get pattern in a controller
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

41 How to add AutoPostback functionality with jQuery
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

42 Working with the FormCollection object in the Order controller
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

43 Working with the FormCollection object in the Order controller (cont.)
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

44 Working with the FormCollection object in the Order controller (cont.)
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

45 © 2016, Mike Murach & Associates, Inc.
The textbox and hidden field of the Order/Index view after it has been revised for model binding © 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

46 Working with model binding in the Cart controller
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

47 Model binding in the Cart controller (cont.)
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015

48 Extra 25-1 Step through the MVC application
© 2016, Mike Murach & Associates, Inc. Murach's ASP.NET 4.6 with C# 2015


Download ppt "© 2016, Mike Murach & Associates, Inc."

Similar presentations


Ads by Google