Embbed .NET Custom Control (ActiveX) into ASP .NET page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Budhi Saputra Prasetya

    Embbed .NET Custom Control (ActiveX) into ASP .NET page

    Hi All,

    I'm trying to display .NET Custom Control (created using Inherited Control)
    on an ASPX page, but no luck. I already registered the Control to Global
    Assembly Cache through .NET Framework 1.1 Configuration. I have also put a
    reference to the control on my ASP .NET project. The view that I get is only
    a disabled text area.

    Below is the code that I'm using:

    <html>
    <script language="JScri pt">
    function ChangeText() {
    simpleControl1. Text = text1.value;
    }
    </script>
    <body>
    <p>Simple Control
    <br>
    <br>
    <object id="simpleContr ol1"
    classid="http:b in/ActiveXDotNet.d ll#ActiveXDotNe t.SimpleControl " height="300"
    width="300" VIEWASTEXT>
    <param name="Text" value="Simple Control">
    </object>
    <br>
    <br>
    <input type="text" id="text1" NAME="text1">
    <input type="button" value="Change Text" onclick="Change Text()"
    ID="Button1" NAME="Button1">
    </p>
    </body>
    </html>

    Can anyone help me with the issue?

    Regards,
    Budhi
  • Steve C. Orr [MVP, MCSD]

    #2
    Re: Embbed .NET Custom Control (ActiveX) into ASP .NET page

    You shouldn't GAC it. It shouldn't be strong named.
    Instead it belongs in the web root of your web application so it can be
    automatically downloaded.
    Here's more info:



    --
    I hope this helps,
    Steve C. Orr
    MCSD, MVP, CSM



    "Budhi Saputra Prasetya" <BudhiSaputraPr asetya@discussi ons.microsoft.c om>
    wrote in message news:26ACE589-9673-4DF5-A850-02ACDF83F06E@mi crosoft.com...
    Hi All,
    >
    I'm trying to display .NET Custom Control (created using Inherited
    Control)
    on an ASPX page, but no luck. I already registered the Control to Global
    Assembly Cache through .NET Framework 1.1 Configuration. I have also put a
    reference to the control on my ASP .NET project. The view that I get is
    only
    a disabled text area.
    >
    Below is the code that I'm using:
    >
    <html>
    <script language="JScri pt">
    function ChangeText() {
    simpleControl1. Text = text1.value;
    }
    </script>
    <body>
    <p>Simple Control
    <br>
    <br>
    <object id="simpleContr ol1"
    classid="http:b in/ActiveXDotNet.d ll#ActiveXDotNe t.SimpleControl "
    height="300"
    width="300" VIEWASTEXT>
    <param name="Text" value="Simple Control">
    </object>
    <br>
    <br>
    <input type="text" id="text1" NAME="text1">
    <input type="button" value="Change Text" onclick="Change Text()"
    ID="Button1" NAME="Button1">
    </p>
    </body>
    </html>
    >
    Can anyone help me with the issue?
    >
    Regards,
    Budhi

    Comment

    • Budhi Saputra Prasetya

      #3
      Re: Embbed .NET Custom Control (ActiveX) into ASP .NET page

      Hi Steve,

      Thanks for the answer. It works fine now. Now I'm trying to sign my active x
      control so it can execute certain program on the client's computer. The
      ActiveX will be in the intranet, so there won't be any issue with public
      domain. Any insight on this matter?

      Regards,
      Budhi

      "Steve C. Orr [MVP, MCSD]" wrote:
      You shouldn't GAC it. It shouldn't be strong named.
      Instead it belongs in the web root of your web application so it can be
      automatically downloaded.
      Here's more info:
      >

      >
      --
      I hope this helps,
      Steve C. Orr
      MCSD, MVP, CSM

      >
      >
      "Budhi Saputra Prasetya" <BudhiSaputraPr asetya@discussi ons.microsoft.c om>
      wrote in message news:26ACE589-9673-4DF5-A850-02ACDF83F06E@mi crosoft.com...
      Hi All,

      I'm trying to display .NET Custom Control (created using Inherited
      Control)
      on an ASPX page, but no luck. I already registered the Control to Global
      Assembly Cache through .NET Framework 1.1 Configuration. I have also put a
      reference to the control on my ASP .NET project. The view that I get is
      only
      a disabled text area.

      Below is the code that I'm using:

      <html>
      <script language="JScri pt">
      function ChangeText() {
      simpleControl1. Text = text1.value;
      }
      </script>
      <body>
      <p>Simple Control
      <br>
      <br>
      <object id="simpleContr ol1"
      classid="http:b in/ActiveXDotNet.d ll#ActiveXDotNe t.SimpleControl "
      height="300"
      width="300" VIEWASTEXT>
      <param name="Text" value="Simple Control">
      </object>
      <br>
      <br>
      <input type="text" id="text1" NAME="text1">
      <input type="button" value="Change Text" onclick="Change Text()"
      ID="Button1" NAME="Button1">
      </p>
      </body>
      </html>

      Can anyone help me with the issue?

      Regards,
      Budhi
      >
      >
      >

      Comment

      • Steve C. Orr [MVP, MCSD]

        #4
        Re: Embbed .NET Custom Control (ActiveX) into ASP .NET page

        If it's signed I'm pretty sure it won't work in this embedded way you are
        trying.
        I also want to clarify that it isn't truly an ActiveX control you are
        making, it is an embedded windows forms control.
        ActiveX controls are based on COM, and while they have some similarities
        there are also many differences between ActiveX controls and embedded
        windows forms controls.

        --
        I hope this helps,
        Steve C. Orr
        MCSD, MVP, CSM



        "Budhi Saputra Prasetya" <BudhiSaputraPr asetya@discussi ons.microsoft.c om>
        wrote in message news:6B40C754-F73C-4CCA-A26E-CD3FA22E1E71@mi crosoft.com...
        Hi Steve,
        >
        Thanks for the answer. It works fine now. Now I'm trying to sign my active
        x
        control so it can execute certain program on the client's computer. The
        ActiveX will be in the intranet, so there won't be any issue with public
        domain. Any insight on this matter?
        >
        Regards,
        Budhi
        >
        "Steve C. Orr [MVP, MCSD]" wrote:
        >
        >You shouldn't GAC it. It shouldn't be strong named.
        >Instead it belongs in the web root of your web application so it can be
        >automaticall y downloaded.
        >Here's more info:
        >>
        >http://SteveOrr.net/articles/WinformControls.aspx
        >>
        >--
        >I hope this helps,
        >Steve C. Orr
        >MCSD, MVP, CSM
        >http://SteveOrr.net
        >>
        >>
        >"Budhi Saputra Prasetya" <BudhiSaputraPr asetya@discussi ons.microsoft.c om>
        >wrote in message
        >news:26ACE58 9-9673-4DF5-A850-02ACDF83F06E@mi crosoft.com...
        Hi All,
        >
        I'm trying to display .NET Custom Control (created using Inherited
        Control)
        on an ASPX page, but no luck. I already registered the Control to
        Global
        Assembly Cache through .NET Framework 1.1 Configuration. I have also
        put a
        reference to the control on my ASP .NET project. The view that I get is
        only
        a disabled text area.
        >
        Below is the code that I'm using:
        >
        <html>
        <script language="JScri pt">
        function ChangeText() {
        simpleControl1. Text = text1.value;
        }
        </script>
        <body>
        <p>Simple Control
        <br>
        <br>
        <object id="simpleContr ol1"
        classid="http:b in/ActiveXDotNet.d ll#ActiveXDotNe t.SimpleControl "
        height="300"
        width="300" VIEWASTEXT>
        <param name="Text" value="Simple Control">
        </object>
        <br>
        <br>
        <input type="text" id="text1" NAME="text1">
        <input type="button" value="Change Text" onclick="Change Text()"
        ID="Button1" NAME="Button1">
        </p>
        </body>
        </html>
        >
        Can anyone help me with the issue?
        >
        Regards,
        Budhi
        >>
        >>
        >>

        Comment

        • Seth Bourne

          #5
          Re: Embbed .NET Custom Control (ActiveX) into ASP .NET page

          what is the different between activeX controls and windows control library ?


          "Steve C. Orr [MVP, MCSD]" <Steve@Orr.netw rote in message
          news:e8eG5rG2GH A.4176@TK2MSFTN GP06.phx.gbl...
          If it's signed I'm pretty sure it won't work in this embedded way you are
          trying.
          I also want to clarify that it isn't truly an ActiveX control you are
          making, it is an embedded windows forms control.
          ActiveX controls are based on COM, and while they have some similarities
          there are also many differences between ActiveX controls and embedded
          windows forms controls.
          >
          --
          I hope this helps,
          Steve C. Orr
          MCSD, MVP, CSM

          >
          >
          "Budhi Saputra Prasetya" <BudhiSaputraPr asetya@discussi ons.microsoft.c om>
          wrote in message
          news:6B40C754-F73C-4CCA-A26E-CD3FA22E1E71@mi crosoft.com...
          >Hi Steve,
          >>
          >Thanks for the answer. It works fine now. Now I'm trying to sign my
          >active x
          >control so it can execute certain program on the client's computer. The
          >ActiveX will be in the intranet, so there won't be any issue with public
          >domain. Any insight on this matter?
          >>
          >Regards,
          >Budhi
          >>
          >"Steve C. Orr [MVP, MCSD]" wrote:
          >>
          >>You shouldn't GAC it. It shouldn't be strong named.
          >>Instead it belongs in the web root of your web application so it can be
          >>automatical ly downloaded.
          >>Here's more info:
          >>>
          >>http://SteveOrr.net/articles/WinformControls.aspx
          >>>
          >>--
          >>I hope this helps,
          >>Steve C. Orr
          >>MCSD, MVP, CSM
          >>http://SteveOrr.net
          >>>
          >>>
          >>"Budhi Saputra Prasetya"
          >><BudhiSaputra Prasetya@discus sions.microsoft .com>
          >>wrote in message
          >>news:26ACE5 89-9673-4DF5-A850-02ACDF83F06E@mi crosoft.com...
          >Hi All,
          >>
          >I'm trying to display .NET Custom Control (created using Inherited
          >Control)
          >on an ASPX page, but no luck. I already registered the Control to
          >Global
          >Assembly Cache through .NET Framework 1.1 Configuration. I have also
          >put a
          >reference to the control on my ASP .NET project. The view that I get
          >is
          >only
          >a disabled text area.
          >>
          >Below is the code that I'm using:
          >>
          ><html>
          > <script language="JScri pt">
          > function ChangeText() {
          > simpleControl1. Text = text1.value;
          > }
          > </script>
          > <body>
          > <p>Simple Control
          > <br>
          > <br>
          > <object id="simpleContr ol1"
          >classid="http: bin/ActiveXDotNet.d ll#ActiveXDotNe t.SimpleControl "
          >height="300"
          >width="300" VIEWASTEXT>
          > <param name="Text" value="Simple Control">
          > </object>
          > <br>
          > <br>
          > <input type="text" id="text1" NAME="text1">
          > <input type="button" value="Change Text" onclick="Change Text()"
          >ID="Button1" NAME="Button1">
          > </p>
          > </body>
          ></html>
          >>
          >Can anyone help me with the issue?
          >>
          >Regards,
          >Budhi
          >>>
          >>>
          >>>
          >
          >

          Comment

          • Steve C. Orr [MVP, MCSD]

            #6
            Re: Embbed .NET Custom Control (ActiveX) into ASP .NET page

            I don't have time to detail all the differences, but what it boils down to
            from a browser perspective is that ActiveX controls have all or nothing
            permissions, while embedded windows forms controls run inside the security
            context of the .NET framework and also Internet Explorer. This makes them
            much safer for users and much more configurable so they can be given
            permission to do only what they need to do and nothing more so they can't be
            so easily misused and/or hacked.
            ActiveX controls are one of the leading sources of Spyware, Adware, and
            other annoyances that have infiltrated the Internet over the last several
            years. It's time for them to go away.
            ..NET controls are much more secure. Of course now we developers must deal
            with the layers of security to achieve the functionality we need. Not so
            great for us, but it is very good for the Internet in general.

            --
            I hope this helps,
            Steve C. Orr
            MCSD, MVP, CSM



            "Seth Bourne" <seth_20@yahoo. comwrote in message
            news:O4bPP7N2GH A.4752@TK2MSFTN GP05.phx.gbl...
            what is the different between activeX controls and windows control library
            ?
            >
            >
            "Steve C. Orr [MVP, MCSD]" <Steve@Orr.netw rote in message
            news:e8eG5rG2GH A.4176@TK2MSFTN GP06.phx.gbl...
            >If it's signed I'm pretty sure it won't work in this embedded way you are
            >trying.
            >I also want to clarify that it isn't truly an ActiveX control you are
            >making, it is an embedded windows forms control.
            >ActiveX controls are based on COM, and while they have some similarities
            >there are also many differences between ActiveX controls and embedded
            >windows forms controls.
            >>
            >--
            >I hope this helps,
            >Steve C. Orr
            >MCSD, MVP, CSM
            >http://SteveOrr.net
            >>
            >>
            >"Budhi Saputra Prasetya" <BudhiSaputraPr asetya@discussi ons.microsoft.c om>
            >wrote in message
            >news:6B40C75 4-F73C-4CCA-A26E-CD3FA22E1E71@mi crosoft.com...
            >>Hi Steve,
            >>>
            >>Thanks for the answer. It works fine now. Now I'm trying to sign my
            >>active x
            >>control so it can execute certain program on the client's computer. The
            >>ActiveX will be in the intranet, so there won't be any issue with public
            >>domain. Any insight on this matter?
            >>>
            >>Regards,
            >>Budhi
            >>>
            >>"Steve C. Orr [MVP, MCSD]" wrote:
            >>>
            >>>You shouldn't GAC it. It shouldn't be strong named.
            >>>Instead it belongs in the web root of your web application so it can be
            >>>automaticall y downloaded.
            >>>Here's more info:
            >>>>
            >>>http://SteveOrr.net/articles/WinformControls.aspx
            >>>>
            >>>--
            >>>I hope this helps,
            >>>Steve C. Orr
            >>>MCSD, MVP, CSM
            >>>http://SteveOrr.net
            >>>>
            >>>>
            >>>"Budhi Saputra Prasetya"
            >>><BudhiSaputr aPrasetya@discu ssions.microsof t.com>
            >>>wrote in message
            >>>news:26ACE58 9-9673-4DF5-A850-02ACDF83F06E@mi crosoft.com...
            >>Hi All,
            >>>
            >>I'm trying to display .NET Custom Control (created using Inherited
            >>Control)
            >>on an ASPX page, but no luck. I already registered the Control to
            >>Global
            >>Assembly Cache through .NET Framework 1.1 Configuration. I have also
            >>put a
            >>reference to the control on my ASP .NET project. The view that I get
            >>is
            >>only
            >>a disabled text area.
            >>>
            >>Below is the code that I'm using:
            >>>
            >><html>
            >> <script language="JScri pt">
            >> function ChangeText() {
            >> simpleControl1. Text = text1.value;
            >> }
            >> </script>
            >> <body>
            >> <p>Simple Control
            >> <br>
            >> <br>
            >> <object id="simpleContr ol1"
            >>classid="http :bin/ActiveXDotNet.d ll#ActiveXDotNe t.SimpleControl "
            >>height="300 "
            >>width="300" VIEWASTEXT>
            >> <param name="Text" value="Simple Control">
            >> </object>
            >> <br>
            >> <br>
            >> <input type="text" id="text1" NAME="text1">
            >> <input type="button" value="Change Text" onclick="Change Text()"
            >>ID="Button1 " NAME="Button1">
            >> </p>
            >> </body>
            >></html>
            >>>
            >>Can anyone help me with the issue?
            >>>
            >>Regards,
            >>Budhi
            >>>>
            >>>>
            >>>>
            >>
            >>
            >
            >

            Comment

            • Seth Bourne

              #7
              Re: Embbed .NET Custom Control (ActiveX) into ASP .NET page

              The old ActiveX controls download the binary (DLL or OCX files), it's like
              the application downloaded and then run it from the client. does the .net
              custom control have the similar architecture ?

              "Steve C. Orr [MVP, MCSD]" <Steve@Orr.netw rote in message
              news:eTm5T6Q2GH A.4388@TK2MSFTN GP03.phx.gbl...
              >I don't have time to detail all the differences, but what it boils down to
              >from a browser perspective is that ActiveX controls have all or nothing
              >permissions, while embedded windows forms controls run inside the security
              >context of the .NET framework and also Internet Explorer. This makes them
              >much safer for users and much more configurable so they can be given
              >permission to do only what they need to do and nothing more so they can't
              >be so easily misused and/or hacked.
              ActiveX controls are one of the leading sources of Spyware, Adware, and
              other annoyances that have infiltrated the Internet over the last several
              years. It's time for them to go away.
              .NET controls are much more secure. Of course now we developers must deal
              with the layers of security to achieve the functionality we need. Not so
              great for us, but it is very good for the Internet in general.
              >
              --
              I hope this helps,
              Steve C. Orr
              MCSD, MVP, CSM

              >
              >
              "Seth Bourne" <seth_20@yahoo. comwrote in message
              news:O4bPP7N2GH A.4752@TK2MSFTN GP05.phx.gbl...
              >what is the different between activeX controls and windows control
              >library ?
              >>
              >>
              >"Steve C. Orr [MVP, MCSD]" <Steve@Orr.netw rote in message
              >news:e8eG5rG2G HA.4176@TK2MSFT NGP06.phx.gbl.. .
              >>If it's signed I'm pretty sure it won't work in this embedded way you
              >>are trying.
              >>I also want to clarify that it isn't truly an ActiveX control you are
              >>making, it is an embedded windows forms control.
              >>ActiveX controls are based on COM, and while they have some similarities
              >>there are also many differences between ActiveX controls and embedded
              >>windows forms controls.
              >>>
              >>--
              >>I hope this helps,
              >>Steve C. Orr
              >>MCSD, MVP, CSM
              >>http://SteveOrr.net
              >>>
              >>>
              >>"Budhi Saputra Prasetya"
              >><BudhiSaputra Prasetya@discus sions.microsoft .comwrote in message
              >>news:6B40C7 54-F73C-4CCA-A26E-CD3FA22E1E71@mi crosoft.com...
              >>>Hi Steve,
              >>>>
              >>>Thanks for the answer. It works fine now. Now I'm trying to sign my
              >>>active x
              >>>control so it can execute certain program on the client's computer. The
              >>>ActiveX will be in the intranet, so there won't be any issue with
              >>>public
              >>>domain. Any insight on this matter?
              >>>>
              >>>Regards,
              >>>Budhi
              >>>>
              >>>"Steve C. Orr [MVP, MCSD]" wrote:
              >>>>
              >>>>You shouldn't GAC it. It shouldn't be strong named.
              >>>>Instead it belongs in the web root of your web application so it can
              >>>>be
              >>>>automatical ly downloaded.
              >>>>Here's more info:
              >>>>>
              >>>>http://SteveOrr.net/articles/WinformControls.aspx
              >>>>>
              >>>>--
              >>>>I hope this helps,
              >>>>Steve C. Orr
              >>>>MCSD, MVP, CSM
              >>>>http://SteveOrr.net
              >>>>>
              >>>>>
              >>>>"Budhi Saputra Prasetya"
              >>>><BudhiSaput raPrasetya@disc ussions.microso ft.com>
              >>>>wrote in message
              >>>>news:26ACE5 89-9673-4DF5-A850-02ACDF83F06E@mi crosoft.com...
              >>>Hi All,
              >>>>
              >>>I'm trying to display .NET Custom Control (created using Inherited
              >>>Control)
              >>>on an ASPX page, but no luck. I already registered the Control to
              >>>Global
              >>>Assembly Cache through .NET Framework 1.1 Configuration. I have also
              >>>put a
              >>>reference to the control on my ASP .NET project. The view that I get
              >>>is
              >>>only
              >>>a disabled text area.
              >>>>
              >>>Below is the code that I'm using:
              >>>>
              >>><html>
              >>> <script language="JScri pt">
              >>> function ChangeText() {
              >>> simpleControl1. Text = text1.value;
              >>> }
              >>> </script>
              >>> <body>
              >>> <p>Simple Control
              >>> <br>
              >>> <br>
              >>> <object id="simpleContr ol1"
              >>>classid="htt p:bin/ActiveXDotNet.d ll#ActiveXDotNe t.SimpleControl "
              >>>height="30 0"
              >>>width="300 " VIEWASTEXT>
              >>> <param name="Text" value="Simple Control">
              >>> </object>
              >>> <br>
              >>> <br>
              >>> <input type="text" id="text1" NAME="text1">
              >>> <input type="button" value="Change Text" onclick="Change Text()"
              >>>ID="Button 1" NAME="Button1">
              >>> </p>
              >>> </body>
              >>></html>
              >>>>
              >>>Can anyone help me with the issue?
              >>>>
              >>>Regards,
              >>>Budhi
              >>>>>
              >>>>>
              >>>>>
              >>>
              >>>
              >>
              >>
              >
              >

              Comment

              Working...