Need help in ASPX!

  • Thread starter Thread starter Santosh
  • Start date Start date
S

Santosh

Friends,

I have a DLL which has a Method called WriteStream, which outputs to the
screen just like a Response.Write (".......")

I would like to use this in ASPX page, I have no problem instantiating this
Object.
But When I want to use this Inside a Procedure say

<%@ Page Language="vb" autoeventwireup="false" aspcompat=true %>

Dim ObjWrite as Object
'
ObjWrite = Server.CreateObject("WriteObject.WriteClass")

Sub OutPutThistoScreen()
ObjWrite.WriteStream( "This is a Test" )
'
End Sub

I am not able to do the above, but this was possible in ASP why not in ASPX?
And how can I overcome this in ASPX.

Any help is greatly appreciated.

TIA.
 
Is your dll a COM dll

If it is then it's unmanaged and cannot be directly called from .NET which is managed. Instead you have to COM interoperablity

If you can add a reference to the registered COM object in your .NET project then you can use it like any other .NET component. .NET will wrap it automatically to work under managed environment

Click on the following link for details and samples
http://samples.gotdotnet.com/quickstart/howto/doc/Interop/Interop_Overview.asp

HTH
Suresh


----- Santosh wrote: ----

Friends

I have a DLL which has a Method called WriteStream, which outputs to th
screen just like a Response.Write ("......."

I would like to use this in ASPX page, I have no problem instantiating thi
Object
But When I want to use this Inside a Procedure sa

<%@ Page Language="vb" autoeventwireup="false" aspcompat=true %

Dim ObjWrite as Objec

ObjWrite = Server.CreateObject("WriteObject.WriteClass"

Sub OutPutThistoScreen(
ObjWrite.WriteStream( "This is a Test"

End Su

I am not able to do the above, but this was possible in ASP why not in ASPX
And how can I overcome this in ASPX

Any help is greatly appreciated

TIA
 
Back
Top