Visual Studio 2008 Add Toolbox Item

I have a couple of lines of JavaScript, how can I create a toolbox add-in to be able to insert the text in my code?
jonatecAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

13598Commented:
Wouldn't just saving it as a code snippet work?
All you want to do is be able to paste it easily in your code, correct?
0
13598Commented:
You would just open the code Snippets Manager under Tools, click on Add and point to where the text file is.
0
jonatecAuthor Commented:
Interesting. Never used the Code Snippet Manager before.

Just tried and my file is called insert1.js  do I need to rename this with a particular file extension ?

0
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

13598Commented:
0
13598Commented:
0
jonatecAuthor Commented:
I have written a few lines of code in JavaScript. I want to insert this code into a <script block client-side. In my html code the Insert Snippet menu item does not appear in the right-click intellisense. Can I write a Code Snippet in JavaScript ?
0
13598Commented:
It has been a while since I created a snippet but I used this free tool that makes it very easy.
http://snippetdesigner.codeplex.com/Wikipage
0
jonatecAuthor Commented:
Hi.

Followed the steps in your last link and this is my code file that I'm trying to create as a snippet:

<reference path="file://C:/PROJECTS/jQuery Recipes/MyExamples/MyExamples/script/insert1.js" />

  <script type="text/javascript" src="script/jquery-1.4.2.js"></script>

  <script type="text/javascript">
    $(document).ready(function() {
    });
  </script>

However after holding Ctrl+Shift J to update the JavaScript references, the code snippet doesn't appear in the JS right-click intellisense? What do I do next ?


0
jonatecAuthor Commented:
I managed to select a few lines of code then drag this onto the toolbox tab, fine this works. Problem now is that after closing then re-opening VS the new toolbox tab I created, together with the code snippet has dissapeared. Is this a known problem or what am I doing wrong?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
13598Commented:
C:/PROJECTS/jQuery Recipes/MyExamples/MyExamples/script/insert1.js is there and you have permissions to it?
0
jonatecAuthor Commented:
Yes.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.