Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. ActiveX controls in ASP .NET

ActiveX controls in ASP .NET

Scheduled Pinned Locked Moved ASP.NET
csharpcomsysadminhelpquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kumar saurabh
    wrote on last edited by
    #1

    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

    S 1 Reply Last reply
    0
    • K Kumar saurabh

      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

      S Offline
      S Offline
      Stephane Rodriguez
      wrote on last edited by
      #2

      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[^].

      K 1 Reply Last reply
      0
      • S Stephane Rodriguez

        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[^].

        K Offline
        K Offline
        Kumar saurabh
        wrote on last edited by
        #3

        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

        S 1 Reply Last reply
        0
        • K Kumar saurabh

          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

          S Offline
          S Offline
          Stephane Rodriguez
          wrote on last edited by
          #4

          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", ...

          K 1 Reply Last reply
          0
          • S Stephane Rodriguez

            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", ...

            K Offline
            K Offline
            Kumar saurabh
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups