SlideShare una empresa de Scribd logo
1 de 17
What’s new in ASP.NET 4?
Your presenter for today? Robert MacLean sadev.co.za @rmaclean
What to expect
Massive Investment - CSS <div> <%--Hidden Content --%> </div> <divclass="aspNetHidden"> <%--Hidden Content --%> </div>
Massive Investment - Standards <spanid="chkboxlst"> <inputid="chkboxlst_0"type="checkbox"/>     <labelfor="chkboxlst_0">Check Box 1</label> <inputid="chkboxlst_1"type="checkbox"/>     <labelfor="chkboxlst_1">Check Box 2</label> <inputid="chkboxlst_2"type="checkbox"/>    <labelfor="chkboxlst_2">Check Box 3</label> </span> <ulid="chkboxlst">   <li><inputid="chkboxlst_0"type="checkbox"/>      <labelfor="chkboxlst_0">Check Box 1</label></li> <li><inputid="chkboxlst_1"type="checkbox"/>      <labelfor="chkboxlst_1">Check Box 2</label></li> <li><inputid="chkboxlst_2"type="checkbox"/>      <labelfor="chkboxlst_2">Check Box 3</label></li> </ul>
ASP.NET 4 <demo/>
CDN’s Web Server Web Server Web Server jQuery 24k jQuery 24k jQuery 24k Browser
CDN’s Web Server Web Server Web Server CDN jQuery 24k Browser
What does MS CDN offer?  jQuery jQuery Validation Ajax Control Toolkit ASP.NET Ajax ASP.NET MVC JavaScript Files
Client ID - Predictable <divid="ctl00_ContentPlaceHolder1_ParentPanel"> <divid="ctl00_ContentPlaceHolder1_ParentPanel_NamingPanel1"> <inputid="ctl00$ContentPlaceHolder1$ParentPanel$NamingPanel1$TextBox1" type="text"value="Hello!"/> </div> <divid="ParentPanel1"> <divid="ParentPanel1_NamingPanel1"> <inputid="ParentPanel1_NamingPanel1_TextBox1" type="text"value="Hello!"/> </div>
Web.ConfigTransforms Locator Magic (i.e. only one, like custom errors) Match Attributes Partial XPath (Conditions) Full XPath
Web.ConfigTransforms Transform Replace Remove RemoveAll Insert SetAttributes RemoveAttributes InsertAfter InsertBefore
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++
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));
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
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!
Questions and Answers Reminder: www.sadev.co.za <questions/>

Más contenido relacionado

La actualidad más candente

Adding a view
Adding a viewAdding a view
Adding a view
Nhan Do
 
Baawjsajq109
Baawjsajq109Baawjsajq109
Baawjsajq109
Thinkful
 
Cis407 a ilab 5 web application development devry university
Cis407 a ilab 5 web application development devry universityCis407 a ilab 5 web application development devry university
Cis407 a ilab 5 web application development devry university
lhkslkdh89009
 
Cis 407 i lab 4 of 7
Cis 407 i lab 4 of 7Cis 407 i lab 4 of 7
Cis 407 i lab 4 of 7
helpido9
 

La actualidad más candente (20)

Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5
 
Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5
 
Hands on With Advanced Data Grid
Hands on With Advanced Data GridHands on With Advanced Data Grid
Hands on With Advanced Data Grid
 
Aloha Presentation #t3con10
Aloha Presentation #t3con10Aloha Presentation #t3con10
Aloha Presentation #t3con10
 
Building a Blogging System -- Rapidly using Alpha Five v10 with Codeless AJAX...
Building a Blogging System -- Rapidly using Alpha Five v10 with Codeless AJAX...Building a Blogging System -- Rapidly using Alpha Five v10 with Codeless AJAX...
Building a Blogging System -- Rapidly using Alpha Five v10 with Codeless AJAX...
 
Deck 6-456 (1)
Deck 6-456 (1)Deck 6-456 (1)
Deck 6-456 (1)
 
home inspection demo
home inspection demohome inspection demo
home inspection demo
 
Php
PhpPhp
Php
 
Adding a view
Adding a viewAdding a view
Adding a view
 
Learn JavaScript HTML & CSS
Learn JavaScript HTML & CSSLearn JavaScript HTML & CSS
Learn JavaScript HTML & CSS
 
Web app-la-jan-2
Web app-la-jan-2Web app-la-jan-2
Web app-la-jan-2
 
Chapter 09
Chapter 09Chapter 09
Chapter 09
 
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start SilverlightDODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
 
Introduction of VS2012 IDE and ASP.NET Controls
Introduction of VS2012 IDE and ASP.NET ControlsIntroduction of VS2012 IDE and ASP.NET Controls
Introduction of VS2012 IDE and ASP.NET Controls
 
Baawjsajq109
Baawjsajq109Baawjsajq109
Baawjsajq109
 
Cis407 a ilab 5 web application development devry university
Cis407 a ilab 5 web application development devry universityCis407 a ilab 5 web application development devry university
Cis407 a ilab 5 web application development devry university
 
bawawjspdx082117
bawawjspdx082117bawawjspdx082117
bawawjspdx082117
 
How to Build a Yahoo! SearchMonkey App
How to Build a Yahoo! SearchMonkey AppHow to Build a Yahoo! SearchMonkey App
How to Build a Yahoo! SearchMonkey App
 
Cis 407 i lab 4 of 7
Cis 407 i lab 4 of 7Cis 407 i lab 4 of 7
Cis 407 i lab 4 of 7
 
Google Apps Script for Beginners- Amazing Things with Code
Google Apps Script for Beginners- Amazing Things with CodeGoogle Apps Script for Beginners- Amazing Things with Code
Google Apps Script for Beginners- Amazing Things with Code
 

Destacado (6)

Core .NET Framework 4.0 Enhancements
Core .NET Framework 4.0 EnhancementsCore .NET Framework 4.0 Enhancements
Core .NET Framework 4.0 Enhancements
 
.net framework from 1.0 -> 4.0
.net framework from 1.0 -> 4.0.net framework from 1.0 -> 4.0
.net framework from 1.0 -> 4.0
 
Introduction of .net framework
Introduction of .net frameworkIntroduction of .net framework
Introduction of .net framework
 
Overview of .Net Framework 4.5
Overview of .Net Framework 4.5Overview of .Net Framework 4.5
Overview of .Net Framework 4.5
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
 

Similar a What's new in ASP.NET 4

Peter lubbers-html5-overview-sf-dev-conf-2011
Peter lubbers-html5-overview-sf-dev-conf-2011Peter lubbers-html5-overview-sf-dev-conf-2011
Peter lubbers-html5-overview-sf-dev-conf-2011
Peter Lubbers
 
Lift Presentation at DuSE VI
Lift Presentation at DuSE VILift Presentation at DuSE VI
Lift Presentation at DuSE VI
Peter Robinett
 
CIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NETCIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NET
webhostingguy
 

Similar a What's new in ASP.NET 4 (20)

Rendering The Fat
Rendering The FatRendering The Fat
Rendering The Fat
 
Peter lubbers-html5-overview-sf-dev-conf-2011
Peter lubbers-html5-overview-sf-dev-conf-2011Peter lubbers-html5-overview-sf-dev-conf-2011
Peter lubbers-html5-overview-sf-dev-conf-2011
 
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBlog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
 
HTML5 Fundamentals
HTML5 FundamentalsHTML5 Fundamentals
HTML5 Fundamentals
 
JavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern ImplementationJavaScript and DOM Pattern Implementation
JavaScript and DOM Pattern Implementation
 
Lift Presentation at DuSE VI
Lift Presentation at DuSE VILift Presentation at DuSE VI
Lift Presentation at DuSE VI
 
Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
Widgets: Making Your Site Great and Letting Others Help - WordCamp VictoriaWidgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
 
CIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NETCIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NET
 
EPiServer Web Parts
EPiServer Web PartsEPiServer Web Parts
EPiServer Web Parts
 
Link your HTML Form to Google Sheet in just 3 Steps.pdf
Link your HTML Form to Google Sheet in just 3 Steps.pdfLink your HTML Form to Google Sheet in just 3 Steps.pdf
Link your HTML Form to Google Sheet in just 3 Steps.pdf
 
Forms With Ajax And Advanced Plugins
Forms With Ajax And Advanced PluginsForms With Ajax And Advanced Plugins
Forms With Ajax And Advanced Plugins
 
GWT Training - Session 2/3
GWT Training - Session 2/3GWT Training - Session 2/3
GWT Training - Session 2/3
 
Usability AJAX and other ASP.NET Features
Usability AJAX and other ASP.NET FeaturesUsability AJAX and other ASP.NET Features
Usability AJAX and other ASP.NET Features
 
Html5
Html5Html5
Html5
 
Html 5, a gentle introduction
Html 5, a gentle introductionHtml 5, a gentle introduction
Html 5, a gentle introduction
 
Bronx study jam 2
Bronx study jam 2Bronx study jam 2
Bronx study jam 2
 
Html5, a gentle introduction
Html5, a gentle introduction Html5, a gentle introduction
Html5, a gentle introduction
 
Microsoft and jQuery: A true love story - templating and other contributions
Microsoft and jQuery: A true love story - templating and other contributionsMicrosoft and jQuery: A true love story - templating and other contributions
Microsoft and jQuery: A true love story - templating and other contributions
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
IE8 Dev Overview_pp2003
IE8 Dev Overview_pp2003IE8 Dev Overview_pp2003
IE8 Dev Overview_pp2003
 

Más de Robert MacLean

Más de Robert MacLean (20)

14 things you need to be a successful software developer (v3)
14 things you need to be a successful software developer (v3)14 things you need to be a successful software developer (v3)
14 things you need to be a successful software developer (v3)
 
Git
GitGit
Git
 
OWASP TOP 10
OWASP TOP 10OWASP TOP 10
OWASP TOP 10
 
Building a µservice with Kotlin, Micronaut & GCP
Building a µservice with Kotlin, Micronaut & GCPBuilding a µservice with Kotlin, Micronaut & GCP
Building a µservice with Kotlin, Micronaut & GCP
 
Looking at the Vue
Looking at the VueLooking at the Vue
Looking at the Vue
 
Kotlin 101
Kotlin 101Kotlin 101
Kotlin 101
 
Features of Kotlin I find exciting
Features of Kotlin I find excitingFeatures of Kotlin I find exciting
Features of Kotlin I find exciting
 
JavaScript Gotchas
JavaScript GotchasJavaScript Gotchas
JavaScript Gotchas
 
DevConf Survival Guide
DevConf Survival GuideDevConf Survival Guide
DevConf Survival Guide
 
The state of testing @ Microsoft
The state of testing @ MicrosoftThe state of testing @ Microsoft
The state of testing @ Microsoft
 
Visual Studio ❤ JavaScript
Visual Studio ❤ JavaScriptVisual Studio ❤ JavaScript
Visual Studio ❤ JavaScript
 
What is new in C# 6?
What is new in C# 6?What is new in C# 6?
What is new in C# 6?
 
Putting the DOT in .NET - Dev/Ops/Test
Putting the DOT in .NET - Dev/Ops/TestPutting the DOT in .NET - Dev/Ops/Test
Putting the DOT in .NET - Dev/Ops/Test
 
A Developer Day 2014 - Durban
A Developer Day 2014 - Durban A Developer Day 2014 - Durban
A Developer Day 2014 - Durban
 
Agile lessons learned in the Microsoft ALM Rangers
Agile lessons learned in the Microsoft ALM RangersAgile lessons learned in the Microsoft ALM Rangers
Agile lessons learned in the Microsoft ALM Rangers
 
Hour of code - Train the trainer
Hour of code - Train the trainerHour of code - Train the trainer
Hour of code - Train the trainer
 
Building services for apps on a shoestring budget
Building services for apps on a shoestring budgetBuilding services for apps on a shoestring budget
Building services for apps on a shoestring budget
 
3 things your app API is doing WRONG
3 things your app API is doing WRONG3 things your app API is doing WRONG
3 things your app API is doing WRONG
 
ASP.NET
ASP.NETASP.NET
ASP.NET
 
LightSwitch
LightSwitchLightSwitch
LightSwitch
 

Último

Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 

Último (20)

Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 

What's new in ASP.NET 4

  • 1. What’s new in ASP.NET 4?
  • 2. Your presenter for today? Robert MacLean sadev.co.za @rmaclean
  • 4. Massive Investment - CSS <div> <%--Hidden Content --%> </div> <divclass="aspNetHidden"> <%--Hidden Content --%> </div>
  • 5. Massive Investment - Standards <spanid="chkboxlst"> <inputid="chkboxlst_0"type="checkbox"/> <labelfor="chkboxlst_0">Check Box 1</label> <inputid="chkboxlst_1"type="checkbox"/> <labelfor="chkboxlst_1">Check Box 2</label> <inputid="chkboxlst_2"type="checkbox"/> <labelfor="chkboxlst_2">Check Box 3</label> </span> <ulid="chkboxlst"> <li><inputid="chkboxlst_0"type="checkbox"/> <labelfor="chkboxlst_0">Check Box 1</label></li> <li><inputid="chkboxlst_1"type="checkbox"/> <labelfor="chkboxlst_1">Check Box 2</label></li> <li><inputid="chkboxlst_2"type="checkbox"/> <labelfor="chkboxlst_2">Check Box 3</label></li> </ul>
  • 7. CDN’s Web Server Web Server Web Server jQuery 24k jQuery 24k jQuery 24k Browser
  • 8. CDN’s Web Server Web Server Web Server CDN jQuery 24k Browser
  • 9. What does MS CDN offer? jQuery jQuery Validation Ajax Control Toolkit ASP.NET Ajax ASP.NET MVC JavaScript Files
  • 10. Client ID - Predictable <divid="ctl00_ContentPlaceHolder1_ParentPanel"> <divid="ctl00_ContentPlaceHolder1_ParentPanel_NamingPanel1"> <inputid="ctl00$ContentPlaceHolder1$ParentPanel$NamingPanel1$TextBox1" type="text"value="Hello!"/> </div> <divid="ParentPanel1"> <divid="ParentPanel1_NamingPanel1"> <inputid="ParentPanel1_NamingPanel1_TextBox1" type="text"value="Hello!"/> </div>
  • 11. Web.ConfigTransforms Locator Magic (i.e. only one, like custom errors) Match Attributes Partial XPath (Conditions) Full XPath
  • 12. Web.ConfigTransforms Transform Replace Remove RemoveAll Insert SetAttributes RemoveAttributes InsertAfter InsertBefore
  • 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!
  • 17. Questions and Answers Reminder: www.sadev.co.za <questions/>
  • 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
  • 21. © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Notas del editor

  1. Hidden fields used to be just in a div, but since there is no meta on it - it can be horrid with styling
  2. 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.