Can I use a javascript in creating a new custom control?

E

eea61

I want to make a new Tree custom control and I have an excellent
jscrpt code for it(DHTML XTree).
this js file contains all the methods and events for creating and
manipulating a tree.

I want to know that can I use this js file in creating my tree custom
control or I should convert all the code to a new C# class and then use
it?

for example by using this script I can create a child:

<div id="treeBox" style="width:200;height:200"></div>
<script>
tree=new dhtmlXTreeObject('treeBox',"100%","100%",0);
...
tree.insertNewChild(0,1,"New Node
1",0,0,0,0,"SELECT,CALL,TOP,CHILD,CHECKED");
</script>

but in a custom control how can I use the above code?
if anyone can help me does me a greate favor...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top