Solved

Code Snippets in VS 2008

Posted on 2008-10-17
5
1,235 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

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

786 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