Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

Creating a toolbox item

$
0
0

Scenario: Create a custom HTML toolbox item. The idea is in many pages i use the same code multiple times. So i have created a snippet and inserted it on the page using the snippets menu and copied it into the toolbox from the design view to create a easy drag and drop toolbox item as shown below.

Source view code:

<div id="DIVID" class="DIVCLASS"
        style="border-width: thin; border-style: solid; position: absolute; top: 400px; left: 15px; width: 246px; height: 61px; text-align: left; bottom: 254px;"><label style="position: absolute; top: 20px; left: 8px; height: 15px; width: 25px; bottom: 22px;">
        Custom</label><input id="TextId" class="TextClass" onmouseover="this.title=this.value"
            style="position: absolute; top: 18px; height: 20px; width: 115px; bottom: 19px; left: 58px;"
            title="" type="text" value="TextValue" />&nbsp;&nbsp;<input id="Button" onclick="SomeFunction(event)"
            style="position: absolute; top:13px; left:188px; width: 50px; height: 30px;"
            type="button" value="Button" /><input name="WriteBox"
            style="display: none; width: 14px; background-image: url('bitmap.bmp'); background-repeat: repeat; height: 12px; z-index: 4;"
            type="text" /></div>


This is the code that i have saved into the snippet library and included under the newly created folder Custom Snippets as shown below

Now after inserting the snippet in the source view using the "Ctrl+k, Ctrl+x" i saved this element into the toolbox from copying it from the design view.

I am using this element for almost a month, this has been very handy. I have been dragging this element "Custom Element" into the design view. Today morning i have started "VWD" and have noticed my custom element was not present.

What am i missing here. Where is the custom tool box element "My Custom Controls/Custom Element" that i have created. Have i followed the correct procedure? How do i get it back? If not how can i create a custom toolbox element.


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>