This is the sixth in a series of blog posts I’m doing on the upcoming VS 2010 and .NET 4 release.
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:
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.
We’ll start by adding a standard
We are going to use the built-in
Typing in “ We’ll select the built-in “loginview” code snippet from the above list and hit the “tab” key to complete it: Want to read full article, Go to Scott Blog Happy Reading
We’ll select the built-in “loginview” code snippet from the above list and hit the “tab” key to complete it:
Want to read full article, Go to Scott Blog