ActiveX controls in ASP .NET
-
Hi Friends, Can I use an Active X control in ASP .NET and make it run as server side control. The ActiveX control is created in VB. I have created a Treeview control in VB which also has Drag and drop feature. the .NET treeview web control does not have any drag and drop feature so i had to create that control. Can this be done?? If i create a control in VB .NET and add the control in the tool boxthen it comes in the tool bar but is disabled so i can not drag it to any webform. Any help???? Kumar Saurabh Software Engneer CBS New Delhi India
-
Hi Friends, Can I use an Active X control in ASP .NET and make it run as server side control. The ActiveX control is created in VB. I have created a Treeview control in VB which also has Drag and drop feature. the .NET treeview web control does not have any drag and drop feature so i had to create that control. Can this be done?? If i create a control in VB .NET and add the control in the tool boxthen it comes in the tool bar but is disabled so i can not drag it to any webform. Any help???? Kumar Saurabh Software Engneer CBS New Delhi India
Kumar saurabh wrote: have created a Treeview control in VB which also has Drag and drop feature. It's a visible control, and has to be rendered somewhere, so it does not make sense to run it on the server side. Kumar saurabh wrote: the .NET treeview web control does not have any drag and drop feature so i had to create that control. Simply wrong. IE web controls[^].
-
Kumar saurabh wrote: have created a Treeview control in VB which also has Drag and drop feature. It's a visible control, and has to be rendered somewhere, so it does not make sense to run it on the server side. Kumar saurabh wrote: the .NET treeview web control does not have any drag and drop feature so i had to create that control. Simply wrong. IE web controls[^].
Hi Stephane, I already have downloaded the IE Web Control and installed and have craeted Microsoft.Web.UI.Webcontrols.dll but the treeview it provides does not have mousedown event so that i can display context menu for a particular node neither it has drag and drop. If these are there then please guide me about it's usage. Thanks. Kumar Saurabh Software Engneer Syndew Pvt Ltd New Delhi India
-
Hi Stephane, I already have downloaded the IE Web Control and installed and have craeted Microsoft.Web.UI.Webcontrols.dll but the treeview it provides does not have mousedown event so that i can display context menu for a particular node neither it has drag and drop. If these are there then please guide me about it's usage. Thanks. Kumar Saurabh Software Engneer Syndew Pvt Ltd New Delhi India
Kumar saurabh wrote: it provides does not have mousedown event so that i can display context menu for a particular node neither it has drag and drop. The contextmenu is a bit hidden. In fact, there is a default implementation for it. Watchout "oncontextmenu" in treeview.htc The drag and drop is left unimplemented. It's up to you to implement and attach an "ondragstart" event handler. When you install the IE web controls, you get the entire source code. The source code uses both csharp and javascript and html code to make, render and manage the state of a treeview. Since the code is provided, it's up to everyone to tweak it according to his own needs. Especially when the same code does not explicitely shows how to take advantage of a particular HTML DOM feature (drag & drop). Good luck! Additional tools : google, ASP.NET "IE web controls forum", ...
-
Kumar saurabh wrote: it provides does not have mousedown event so that i can display context menu for a particular node neither it has drag and drop. The contextmenu is a bit hidden. In fact, there is a default implementation for it. Watchout "oncontextmenu" in treeview.htc The drag and drop is left unimplemented. It's up to you to implement and attach an "ondragstart" event handler. When you install the IE web controls, you get the entire source code. The source code uses both csharp and javascript and html code to make, render and manage the state of a treeview. Since the code is provided, it's up to everyone to tweak it according to his own needs. Especially when the same code does not explicitely shows how to take advantage of a particular HTML DOM feature (drag & drop). Good luck! Additional tools : google, ASP.NET "IE web controls forum", ...
Thanks, I have tried implementing the event on dragstart in the source code which comes along with the control. Three files need changes, Treeview.htc, Treenode.cs and Treeview.cs. I have implemented the event but a new problem is coming. when we create the dll with original source code and add corresponding controls in toolbox and drag the treeview in the design view then .NET also creates a protected variable of corresponding treeview in code behind i.e. when we drag the treeview then an instance TreeView1 is created and a line "Protected WithEvents TreeView1 as Microsoft.Web.UI.Webcontrol.Treeview" is automatically added in .vb(code behind) file. But in case i create the dll with my code added then drag the treeview in the design then no line is added in codebehind. if i create the object with same name (TreeView1) in .vb file even then there is no link created with the design object. when we try to add a node in design mode and apply the changes, an error occurs displaying message "NullReferenceException: Object Reference is not set to instance of an object". Do you know any solution??? Also any other event like Expand and Collapse etc. does not seem to work I have written code for these events but events are not getting fiered. Kumar Saurabh Software Engneer Syndew Pvt Ltd New Delhi India