Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to ASP.NET MVC3 & MVC4 By: Chad W. Stoker (MCTS, MCP, MCAD) President & Chief Technology Officer.

Similar presentations


Presentation on theme: "Introduction to ASP.NET MVC3 & MVC4 By: Chad W. Stoker (MCTS, MCP, MCAD) President & Chief Technology Officer."— Presentation transcript:

1 Introduction to ASP.NET MVC3 & MVC4 By: Chad W. Stoker (MCTS, MCP, MCAD) President & Chief Technology Officer

2 ASP.NET MVC Lifecyce

3 Reminder: Quick Security Setting up an ASP.NET Security db model is as simple as : aspnet_regsql There are different options… I’ll use: aspnet_regsql –S. –E –d MVCMadness –A mr

4 Starting Out w/ ASP.NET Classic How to turn this: Into THIS!

5 Little gotcha w/ ASP.NET MVC4 RC If you run into a problem like: The type 'System.Web.Mvc.ModelClientValidationRule' exists in both 'C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v2.0\Assemblies\System.Web.WebPages.dll' and 'c:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies\System.Web.Mvc.dll ◦Find this in your *.csproj file… ◦Replace with:

6 And more ASP.NET MVC4 gotchas! ◦Find this in your *.csproj file… ◦Replace with: Also, add this to your Web.config’s appSettings node, and reload the CSPROJ file. See: ASP.NET MVC4 Release Notes for moreASP.NET MVC4 Release Notes

7 Note about Web.config update for ASP.NET Classic projects Don’t forget to check out the Web.txt file to find the contents to paste into your ASP.NET classic web.config file. Refer to : http://blogs.msdn.com/b/webdevtools/arc hive/2011/01/20/how-to-get-razor- intellisense-for-model-in-a-class-library- project.aspx http://blogs.msdn.com/b/webdevtools/arc hive/2011/01/20/how-to-get-razor- intellisense-for-model-in-a-class-library- project.aspx

8 Accessing RoutingData From ASPX Forms… use Page.RouteData[] From MVC views… use @Url.RequestContext.RouteData From MVC controllers… use RouteData[] More at: http://www.codeguru.com/csharp/article.p hp/c18645/MVC3-Routing.htm

9 Working w/ Partial-Views @Html.Partial(“”) in views return PartialView(); in controllers Can dynamically generate HTML content with Jquery script… Can override the View-Engine to make searching for your specific folder structure simple!

10 Working w/ Simple DataBinding This is not about how to use Knockout.js… yet. HTML Helpers. ModelBinder and what it does… Good use of Error Partial-View concept…

11 Overriding Security… for SAW?

12 ASP.NET MVC4… the WebAPI Now you can do WCF with MVC… seriously.


Download ppt "Introduction to ASP.NET MVC3 & MVC4 By: Chad W. Stoker (MCTS, MCP, MCAD) President & Chief Technology Officer."

Similar presentations


Ads by Google