ASP.NET has evolved a lot in the last few years with the addition of ASP.NET MVC and Dynamic Data, as well as the continuous improvement of WebForms and ASP.NET AJAX. This session will provide a roadmap of the changes that are coming with ASP.NET 4 and Visual Studio 2010.
13. ASP.NET 4 SCRIPT PREP for demos Open 2 copies of Visual Studio Open IIS and warm it up Open up MVC tools folder Rule 18 Win++
14. New project -> web form,. Point out Standards New project -> empty web project Add files from tools Open weform.aspx, drag on image (Nice to show Document format, Ctrl+K,D) Add id to image [Ctrl+1] Open site.master, drag on jquery Script snippet Add $( to script -> show the intellisense, explain the vsdoc Finish the jquery to enable click on image [Ctrl+2] $(document).ready(function () { $("#vs2010image").click(function () { alert("Visual Studio 2010 Rocks"); }); }); [ 3 SLIDES explaining CDN] Change jQuery to CDN [Ctrl+3] Switch to design mode and drag the scriptmanager on to it (good to show toolbox searching) Properties for scriptmanager and enablecdn Add meta keywords and description (HTML style) to master page [Ctrl+4] Switch to webform Add meta keywords and description (@Page style) [Ctrl+5] F7 to code behind Add meta keywords and description to pageload [Ctrl+6] nice to point out new intellisense feature using this.meta Add two labels and a button to web page [Ctrl+7] Add run time setting of labels [Ctrl+8] if (!IsPostBack) { this.Label1.Text = this.Label2.Text = "Set at runtime"; } DEMO!! Add ViewStateMode="Disabled“ to @Page [Ctrl+9] Add ViewStateMode="Enabled“ to second label [Alt+1] DEMO!! F12, IE Dev Tools, use click and point to second label and show the id of span. Why is this bad? Add ClientIDMode="Static“ to @Page [Alt+2] [1 SLIDE explaining predicatable for looping, table like things – panel/panel/textbox] Drag on chart control – design mode and show types from action button. Go for pie. Properties for chart, ChartArea, 3d, enable 3d, change Inclination to 60 On PageLoad add RandomData to chart [Alt+3] RandomDatarandomData = new RandomData(); Chart1.Series[0].Points.DataBindY(randomData.RandomDouble(10));
15. New project -> MVC No to unit tests Add new area (Blog) from right click on solution Add POSTS model from MVC tools Add POSTS controller, from right click Add folder (Posts) to view FIRST Add view (Index) from right click to posts folder Modifiy the route registration in BlogAreaRegistration.cs [Alt+4] new { controller = "Posts", action = "Index", id = UrlParameter.Optional } Demo!! Add new view- named create. Strongly tie it to the Models.PostModel class and set the view content to Create Show the new labelfor and textboxfor options Now show the PostModel and explain the data validations – Required, StringLength, RegularExpression Add two controller actions for create [ALT+5] point out the new Attribute replacing AcceptVerb attribute public ActionResult Create() { return View(); } [HttpPost] public ActionResult Create(PostModel model) { return View(); } DEMO!!! – add numbers to tags and hit create button. Show the cool validation stuff Explain that text area for content is too small Drag editor templates from Tools, explain ascx control. Explain name and how it ties back to the UIHint attribute in the model Change the textboxfor in the create for body to editorfor DEMO!!!! Add new item – new web form to root and call it list.aspx Drag on grid view, set auto generate select etc.. Set colour F7 code behind – on load add [ALT+6] Open global.asax and before the map routes add the mappageroute [ALT+7] DEMO !!! Jump back to page load and paste in [ALT+8] Next [ALT+9] and explain it won’t work with routes Next {Ctrl+Alt+1] and explain 302 temp Finally [Ctrl+Alt+2] and explain 301 perm DEMO!!! – point out time and talk about caching Add reference (YEAH SPEED) to System.Runtime.Caching Change on load for lists.aspx page to the [CTRL+ALT+3] DEMO!!! - Talk about velocity URL will be http://localhost/Blog/Posts
16. Right click solution and go to package options Explain package web and package SQL – Make sure you untick the include DB on the web page, since the file does not exist Right click build deployment package IIS -> Website -> Import package -> Explain options -> Finish -> Browse Back to VS and web.config (nice to do Ctlr+K,D)-> Show the ARROW Explain the config issue Open the release one and remove first big comment and put [CTRL+ALT+4] there. Replace second big comment and put [CTRL+ALT+5] there. Explain build scenario issue Right click on the solution and go publish, and explain it Publish SLIDES!
18. We Want To Hear From You! Connect with Microsoft South Africa's Developer & Platform Group blogs.msdn.com/southafrica twitter.com/msdevsa Microsoft DevsSA Required Slide
19. Required Slide Win a Wireless Entertainment Desktop 8000! Complete your evaluation and enter to win!
20. Submit an Entry Form at the BB&D Stand and Win*!A Dell Netbook valued at R4,000 * Terms & conditions apply
Hidden fields used to be just in a div, but since there is no meta on it - it can be horrid with styling
Checkboxes and radio buttonsed used to be just dropped in a span, but since they are list items they are now in a list and you can pick if it is ordered or unordered.