Error!
Success!

ASP.NET, HTML, JavaScript Snippet Support in VS2010

0
kicks

ASP.NET, HTML, JavaScript Snippet Support in VS2010  (Unpublished)

This is the sixth in a series of blog posts I’m doing on the upcoming VS 2010 and .NET 4 release. Today’s post covers another useful improvement in VS 2010 – HTML/ASP.NET/JavaScript snippet support. Snippets allow you to be more productive within source view by allowing you to create chunks of code and markup that you can quickly apply and use in your application with a minimum of character typing. Visual Studio has supported the concept of “snippets” for VB and C# in previous releases – but not for HTML, ASP.NET markup and JavaScript. With VS 2010 we now support snippets for these content types as well. Using ASP.NET Snippets Let’s walkthrough how we can use snippets to quickly implement a common security scenario. Specifically, we’ll implement the functionality necessary to display either a “[ Login ]” link or a “[ Welcome UserName ]” message at the the top right of a site depending on whether or not the user is logged in: step1 The above functionality is automatically added for you when you create a project using the new ASP.NET Project Starter Template in VS 2010. For the purpose of this walkthrough, though, we’ll assume we are starting with a blank master page and will build it entirely from scratch.


Kicked By:
Drop Kicked By: