469,575 Members | 1,658 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,575 developers. It's quick & easy.

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?
Nov 22 '05 #1
4 7354
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" <CL*******@discussions.microsoft.com> a écrit dans le message
de news:28**********************************@microsof t.com...
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?

Nov 22 '05 #2
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(sender 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="TestDDL" %>

and adding this to my Code block:

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

but this does not work. Any ideas?

"Patrice" wrote:
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" <CL*******@discussions.microsoft.com> a écrit dans le message
de news:28**********************************@microsof t.com...
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?


Nov 22 '05 #3
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" <CL*******@discussions.microsoft.com> a écrit dans le message
de news:CC**********************************@microsof t.com...
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(sender 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="TestDDL" %>

and adding this to my Code block:

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

but this does not work. Any ideas?

"Patrice" wrote:
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" <CL*******@discussions.microsoft.com> a écrit dans le message de news:28**********************************@microsof t.com...
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?

Nov 22 '05 #4
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:
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" <CL*******@discussions.microsoft.com> a écrit dans le message
de news:CC**********************************@microsof t.com...
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(sender 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="TestDDL" %>

and adding this to my Code block:

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

but this does not work. Any ideas?

"Patrice" wrote:
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" <CL*******@discussions.microsoft.com> a écrit dans le message de news:28**********************************@microsof t.com...
> 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?


Nov 22 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Pjotr Wedersteers | last post: by
12 posts views Thread by bhennon | last post: by
1 post views Thread by itai_regev | last post: by
5 posts views Thread by benc | last post: by
5 posts views Thread by Sean M. Loftus | last post: by
29 posts views Thread by lenbell | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.