|
-
Jul 8th, 2002, 03:34 AM
#1
Thread Starter
Hyperactive Member
Asp Dll ?
Guys, this is an ASP and VB Q so don't shoot me for posting it in the wrong place !
Anyone got any experience using the ASP DLL library in VB OCX's that are hosted in the browser ? I have'nt the first clue how the library would work ? My main question is, if I have an OCX that is running in the Browser, can I manipulate it's hotst HTML page to post etc from inside it using the ASP refernece library ?
Sorry to be 'fick' but it is monday....
Thanks
Peeman.

Best Bar.....
-
Jul 8th, 2002, 04:26 AM
#2
Fanatic Member
i haven't used asp.dll with an OCX before, but i use it within a DLL that writes stuff to the HTML page, so i presume it would work in the same way. i think you have to have cdo.dll referenced too.
in the DLL/OCX
VB Code:
Private m_Application As ASPTypeLibrary.Application
Private m_Request As ASPTypeLibrary.Request
Private m_Response As ASPTypeLibrary.Response
Private m_Session As ASPTypeLibrary.Session
Public Sub OnStartPage(objScriptingContext As ASPTypeLibrary.ScriptingContext)
Set m_Application = objScriptingContext.Application
Set m_Request = objScriptingContext.Request
Set m_Response = objScriptingContext.Response
Set m_Session = objScriptingContext.Session
End Sub
Public Sub OnEndPage()
Set m_Application = Nothing
Set m_Request = Nothing
Set m_Response = Nothing
Set m_Session = Nothing
End Sub
Public Sub WriteSomething()
m_Response.Write "<b>Something</b>"
End Sub
and in global.asa:
VB Code:
Sub Session_OnStart
Session ("ConnectionTimeout") = 30
Session ("CommandTimeout") = 30
End Sub
Sub Session_OnEnd
Session("ConnectionTimeout")= ""
Session("CommandTimeout")= ""
End Sub
Sub Application_OnStart
Application.Lock
Application("ConnectionString")= "DSN=MyDB; User ID=sa"
Application.UnLock
End Sub
Sub Application_OnEnd
Application("ConnectionString")=""
End Sub
hope that helps
Last edited by tr0n; Jul 8th, 2002 at 04:31 AM.
-
Jul 8th, 2002, 04:54 AM
#3
Thread Starter
Hyperactive Member
Thanks !!!
Much appreciated ! I'm sure this'll put me on the right track.
Peeman

Best Bar.....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|