Your SlideShare is downloading. ×
Deep dive into new ASP.NET MVC 4 Features
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Deep dive into new ASP.NET MVC 4 Features

3,401
views

Published on

An in-depth look ASP.NET MVC 4 features including better integration with NuGet, modern templates to support mobile and responsive websites, display mode, customizing generated code with recipes and …

An in-depth look ASP.NET MVC 4 features including better integration with NuGet, modern templates to support mobile and responsive websites, display mode, customizing generated code with recipes and more.


0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,401
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
271
Comments
0
Likes
5
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Peter Himschootpeter@u2u.netU2U
  • 2. ASP.NET Web Forms
  • 3. ASP.NET MVC HTML5
  • 4. ASP.NET MVC HTML5
  • 5. Demo
  • 6. Async
  • 7. public class UploadController : Controller{ public ActionResult Upload() { ... Request.Files[upload].SaveAs(Path.Combine(path, filename)); return Json(Path.GetFileNameWithoutExtension(filename)); }
  • 8. public async Task<ActionResult> Upload_Async(){ var task = Task<ActionResult>.Factory.StartNew(() => { ... Request.Files[upload].SaveAs(Path.Combine(path, filename)); return Json(Path.GetFileNameWithoutExtension(filename)); }); await task; return task.Result;}
  • 9. Demo
  • 10. Adding Mobile support
  • 11. <meta name="viewport" content="width=device-width" />
  • 12. DisplayModes.Modes.Insert(0, new DefaultDisplayMode("WP"){ ContextCondition = (context => context.Request.UserAgent.IndexOf ("Windows Phone", StringComparison.OrdinalIgnoreCase) >= 0)});
  • 13. protected override string TransformPath(string virtualPath, string suffix) { virtualPath = base.TransformPath(virtualPath, suffix); if (CheckCondition()) { virtualPath = virtualPath.Replace("cshtml", string.Format("{0}.cshtml", suffix)); } return virtualPath; }
  • 14. Demo
  • 15. [Export(typeof(IRecipe))]public class MyRecipe : IFolderRecipe{ public bool Execute(ProjectFolder folder) { ... } public bool IsValidTarget(ProjectFolder folder) { ... } public string Description ... public Icon Icon ... public string Name ...}
  • 16. nuget pack <project>.nuspecnuget push <recipe>.<version>.nupkg
  • 17. Demo
  • 18. http://aka.ms/mbl-techhttp://aka.ms/mbl-tech/devprevhttp://aka.ms/mbl-tech/html5
  • 19. Size 40pt for the main topicsSize 40pt for the main topicsSize 40pt for the main topics
  • 20. Size 40pt for the main topicsSize 40pt for the main topics
  • 21. Text goes hereText goes here
  • 22. Text goes hereText goes hereText goes here
  • 23. Simple, clean, &impactful text here.

×