Solved

Code Snippets in VS 2008

Posted on 2008-10-17
5
1,229 Views
Last Modified: 2013-11-26
I am not sure if a 'code snippet' is what I am really looking for, but i saw a programmer drag a custom control type thing from his toolbox in visual studio.  Basically, he had a validation control that he had already put custom properties into.  The same could be for a textbox...he could have made a textbox that already has a certain css class assigned to it.

How did he do this?  

I would like to have a block of html that I have already written saved into one of these code things.  Each time I make a new page, I have to go find an old page that contains the section of html I want to use and copy it, then paste it into my new page.  He simply went into his toolbox and dropped this thing onto the page, it inserted the html automatically.  How cool!  

Thanks for your help,

Br
0
Comment
Question by:volumeIII
5 Comments
 
LVL 13

Expert Comment

by:TechTiger007
ID: 22744175
Yes it is code snippet that you are talking about

You can find how to create code snippets here
http://msdn.microsoft.com/en-us/library/ms165393(VS.80).aspx

Hope that helps
0
 
LVL 48

Accepted Solution

by:
jpaulino earned 250 total points
ID: 22744505
You can use code snippets but that's not code snippets! Select some code drag into the toolbar. Then do the opposite. It's stored text to reuse(like clipboard)
For code snippets you can use this free tool http://msdn.microsoft.com/en-us/vbasic/bb973770.aspx 
0
 
LVL 27

Assisted Solution

by:VBRocks
VBRocks earned 250 total points
ID: 22744971
Another cool thing you can use is Skins.  Visual Studio lets you use skins to layout your control.  Then, once you've added a Theme to your page, you can set the control skin as you like.

Here's a link:
     http://msdn.microsoft.com/en-us/library/ms247256(VS.80).aspx

0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now