At times we need to reuse small pieces of code in many places of our application or in different applications. We just copy the code from one page and paste it to the destination page. This is a time consuming process and also not a good practice. Visual Studio has a great feature, that we can use to place our code snippet inside the toolbox. Steps:
1. Select the code snippet that you want to reuse in your application
2. Drag the selected snippet on to the general Tab.
3. You can rename the selected snippet, by just right clicking on snippet and click on Rename Item.
Now, you can use it anywhere in your application or in any Visual Studio Application by just dragging and dropping the selected snippet.