calling .dll from HTML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • CLEAR-RCIC

    #1

    calling .dll from HTML

    A person in a different division where I work asked for some help. He has an
    HTML website and wants to use some functionality in a .Net .dll that I've
    developed. I currently use this functionality on my ASP.Net website. I
    could easily port his HTML website into ASP.Net in about 5 minutes. The
    problem is that if anything on his site ever breaks in the future, I would
    own the problem because he isn't a programmer. I figured that if I just hand
    him a .Net .dll and some code to call it, he could manage and support it with
    no problems.

    Can a .Net .dll be called from a few lines in an HTML page and if so, how?
  • Patrice

    #2
    Re: calling .dll from HTML

    Not clear...

    You can expose a .NET dll as a COM object. It could be then called server
    side...

    If for now the site contains just static HTML files it won't work (HTML is
    not a programming language, IIS will serve just these files). It should be
    then turn in to something server side scriptable such as ASP and then he'll
    be ablt to call this as a COM ovbject...

    Patrice




    --

    "CLEAR-RCIC" <CLEARRCIC@disc ussions.microso ft.com> a écrit dans le message
    de news:28970F40-733E-4632-8379-0A13A19F5496@mi crosoft.com...[color=blue]
    > A person in a different division where I work asked for some help. He has[/color]
    an[color=blue]
    > HTML website and wants to use some functionality in a .Net .dll that I've
    > developed. I currently use this functionality on my ASP.Net website. I
    > could easily port his HTML website into ASP.Net in about 5 minutes. The
    > problem is that if anything on his site ever breaks in the future, I would
    > own the problem because he isn't a programmer. I figured that if I just[/color]
    hand[color=blue]
    > him a .Net .dll and some code to call it, he could manage and support it[/color]
    with[color=blue]
    > no problems.
    >
    > Can a .Net .dll be called from a few lines in an HTML page and if so, how?[/color]


    Comment

    • CLEAR-RCIC

      #3
      Re: calling .dll from HTML

      Patrice,

      Thanks for responding. I understand you can take an HTML page and change
      the extention to .aspx and host this page on a webserver running the .Net
      framework. This is sometimes called in-line or code-beside programming and
      may appear as follows:

      <%@ Page Language="VB" %>
      <script runat="server">
      Sub Page_Load(sende r As Object, e As EventArgs)
      Response.Write( "Hello")
      End Sub
      </script>
      <HTML>
      ...Original HTML Page.....
      </HTML>

      I'd like to call a function in a .Net .dll that I have already written.
      I've tried putting this in the page:

      <%@ Import Namespace="Test DDL" %>

      and adding this to my Code block:

      Sub Page_Load(sende r As Object, e As EventArgs)
      Response.Write( "Hello")
      Dim myTestDDL as TestDDL
      End Sub

      but this does not work. Any ideas?

      "Patrice" wrote:
      [color=blue]
      > Not clear...
      >
      > You can expose a .NET dll as a COM object. It could be then called server
      > side...
      >
      > If for now the site contains just static HTML files it won't work (HTML is
      > not a programming language, IIS will serve just these files). It should be
      > then turn in to something server side scriptable such as ASP and then he'll
      > be ablt to call this as a COM ovbject...
      >
      > Patrice
      >
      >
      >
      >
      > --
      >
      > "CLEAR-RCIC" <CLEARRCIC@disc ussions.microso ft.com> a écrit dans le message
      > de news:28970F40-733E-4632-8379-0A13A19F5496@mi crosoft.com...[color=green]
      > > A person in a different division where I work asked for some help. He has[/color]
      > an[color=green]
      > > HTML website and wants to use some functionality in a .Net .dll that I've
      > > developed. I currently use this functionality on my ASP.Net website. I
      > > could easily port his HTML website into ASP.Net in about 5 minutes. The
      > > problem is that if anything on his site ever breaks in the future, I would
      > > own the problem because he isn't a programmer. I figured that if I just[/color]
      > hand[color=green]
      > > him a .Net .dll and some code to call it, he could manage and support it[/color]
      > with[color=green]
      > > no problems.
      > >
      > > Can a .Net .dll be called from a few lines in an HTML page and if so, how?[/color]
      >
      >
      >[/color]

      Comment

      • Patrice

        #4
        Re: calling .dll from HTML

        Ok, just wanted to sort of the possible HTML static file issue...

        Using .NET it should be even issue. Did you put your DLL in the application
        /bin directory. If yes or if it still fails once done what is the message
        you have at compile time ?

        Patrice

        --

        "CLEAR-RCIC" <CLEARRCIC@disc ussions.microso ft.com> a écrit dans le message
        de news:CC8A2A6F-FDA7-4E57-B581-ACA8056BFA7A@mi crosoft.com...[color=blue]
        > Patrice,
        >
        > Thanks for responding. I understand you can take an HTML page and change
        > the extention to .aspx and host this page on a webserver running the .Net
        > framework. This is sometimes called in-line or code-beside programming[/color]
        and[color=blue]
        > may appear as follows:
        >
        > <%@ Page Language="VB" %>
        > <script runat="server">
        > Sub Page_Load(sende r As Object, e As EventArgs)
        > Response.Write( "Hello")
        > End Sub
        > </script>
        > <HTML>
        > ...Original HTML Page.....
        > </HTML>
        >
        > I'd like to call a function in a .Net .dll that I have already written.
        > I've tried putting this in the page:
        >
        > <%@ Import Namespace="Test DDL" %>
        >
        > and adding this to my Code block:
        >
        > Sub Page_Load(sende r As Object, e As EventArgs)
        > Response.Write( "Hello")
        > Dim myTestDDL as TestDDL
        > End Sub
        >
        > but this does not work. Any ideas?
        >
        > "Patrice" wrote:
        >[color=green]
        > > Not clear...
        > >
        > > You can expose a .NET dll as a COM object. It could be then called[/color][/color]
        server[color=blue][color=green]
        > > side...
        > >
        > > If for now the site contains just static HTML files it won't work (HTML[/color][/color]
        is[color=blue][color=green]
        > > not a programming language, IIS will serve just these files). It should[/color][/color]
        be[color=blue][color=green]
        > > then turn in to something server side scriptable such as ASP and then[/color][/color]
        he'll[color=blue][color=green]
        > > be ablt to call this as a COM ovbject...
        > >
        > > Patrice
        > >
        > >
        > >
        > >
        > > --
        > >
        > > "CLEAR-RCIC" <CLEARRCIC@disc ussions.microso ft.com> a écrit dans le[/color][/color]
        message[color=blue][color=green]
        > > de news:28970F40-733E-4632-8379-0A13A19F5496@mi crosoft.com...[color=darkred]
        > > > A person in a different division where I work asked for some help. He[/color][/color][/color]
        has[color=blue][color=green]
        > > an[color=darkred]
        > > > HTML website and wants to use some functionality in a .Net .dll that[/color][/color][/color]
        I've[color=blue][color=green][color=darkred]
        > > > developed. I currently use this functionality on my ASP.Net website.[/color][/color][/color]
        I[color=blue][color=green][color=darkred]
        > > > could easily port his HTML website into ASP.Net in about 5 minutes.[/color][/color][/color]
        The[color=blue][color=green][color=darkred]
        > > > problem is that if anything on his site ever breaks in the future, I[/color][/color][/color]
        would[color=blue][color=green][color=darkred]
        > > > own the problem because he isn't a programmer. I figured that if I[/color][/color][/color]
        just[color=blue][color=green]
        > > hand[color=darkred]
        > > > him a .Net .dll and some code to call it, he could manage and support[/color][/color][/color]
        it[color=blue][color=green]
        > > with[color=darkred]
        > > > no problems.
        > > >
        > > > Can a .Net .dll be called from a few lines in an HTML page and if so,[/color][/color][/color]
        how?[color=blue][color=green]
        > >
        > >
        > >[/color][/color]


        Comment

        • CLEAR-RCIC

          #5
          Re: calling .dll from HTML

          Yes. I put my .dll in the /bin folder. The error I get is:

          Compiler Error Message: BC30002: Type 'TestDLL' is not defined.

          "Patrice" wrote:
          [color=blue]
          > Ok, just wanted to sort of the possible HTML static file issue...
          >
          > Using .NET it should be even issue. Did you put your DLL in the application
          > /bin directory. If yes or if it still fails once done what is the message
          > you have at compile time ?
          >
          > Patrice
          >
          > --
          >
          > "CLEAR-RCIC" <CLEARRCIC@disc ussions.microso ft.com> a écrit dans le message
          > de news:CC8A2A6F-FDA7-4E57-B581-ACA8056BFA7A@mi crosoft.com...[color=green]
          > > Patrice,
          > >
          > > Thanks for responding. I understand you can take an HTML page and change
          > > the extention to .aspx and host this page on a webserver running the .Net
          > > framework. This is sometimes called in-line or code-beside programming[/color]
          > and[color=green]
          > > may appear as follows:
          > >
          > > <%@ Page Language="VB" %>
          > > <script runat="server">
          > > Sub Page_Load(sende r As Object, e As EventArgs)
          > > Response.Write( "Hello")
          > > End Sub
          > > </script>
          > > <HTML>
          > > ...Original HTML Page.....
          > > </HTML>
          > >
          > > I'd like to call a function in a .Net .dll that I have already written.
          > > I've tried putting this in the page:
          > >
          > > <%@ Import Namespace="Test DDL" %>
          > >
          > > and adding this to my Code block:
          > >
          > > Sub Page_Load(sende r As Object, e As EventArgs)
          > > Response.Write( "Hello")
          > > Dim myTestDDL as TestDDL
          > > End Sub
          > >
          > > but this does not work. Any ideas?
          > >
          > > "Patrice" wrote:
          > >[color=darkred]
          > > > Not clear...
          > > >
          > > > You can expose a .NET dll as a COM object. It could be then called[/color][/color]
          > server[color=green][color=darkred]
          > > > side...
          > > >
          > > > If for now the site contains just static HTML files it won't work (HTML[/color][/color]
          > is[color=green][color=darkred]
          > > > not a programming language, IIS will serve just these files). It should[/color][/color]
          > be[color=green][color=darkred]
          > > > then turn in to something server side scriptable such as ASP and then[/color][/color]
          > he'll[color=green][color=darkred]
          > > > be ablt to call this as a COM ovbject...
          > > >
          > > > Patrice
          > > >
          > > >
          > > >
          > > >
          > > > --
          > > >
          > > > "CLEAR-RCIC" <CLEARRCIC@disc ussions.microso ft.com> a écrit dans le[/color][/color]
          > message[color=green][color=darkred]
          > > > de news:28970F40-733E-4632-8379-0A13A19F5496@mi crosoft.com...
          > > > > A person in a different division where I work asked for some help. He[/color][/color]
          > has[color=green][color=darkred]
          > > > an
          > > > > HTML website and wants to use some functionality in a .Net .dll that[/color][/color]
          > I've[color=green][color=darkred]
          > > > > developed. I currently use this functionality on my ASP.Net website.[/color][/color]
          > I[color=green][color=darkred]
          > > > > could easily port his HTML website into ASP.Net in about 5 minutes.[/color][/color]
          > The[color=green][color=darkred]
          > > > > problem is that if anything on his site ever breaks in the future, I[/color][/color]
          > would[color=green][color=darkred]
          > > > > own the problem because he isn't a programmer. I figured that if I[/color][/color]
          > just[color=green][color=darkred]
          > > > hand
          > > > > him a .Net .dll and some code to call it, he could manage and support[/color][/color]
          > it[color=green][color=darkred]
          > > > with
          > > > > no problems.
          > > > >
          > > > > Can a .Net .dll be called from a few lines in an HTML page and if so,[/color][/color]
          > how?[color=green][color=darkred]
          > > >
          > > >
          > > >[/color][/color]
          >
          >
          >[/color]

          Comment

          Working...