Results 1 to 3 of 3

Thread: Asp Dll ?

  1. #1

    Thread Starter
    Hyperactive Member FATBOYPEE's Avatar
    Join Date
    May 2001
    Location
    Charleville (Ireland) Still. ANYONE GOT A JOB I CAN HAVE ? GIZA JOB. I CAN DO THAT....
    Posts
    463

    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.....

  2. #2
    Fanatic Member
    Join Date
    Apr 2002
    Posts
    638
    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:
    1. Private m_Application As ASPTypeLibrary.Application
    2. Private m_Request As ASPTypeLibrary.Request
    3. Private m_Response As ASPTypeLibrary.Response
    4. Private m_Session As ASPTypeLibrary.Session
    5.  
    6. Public Sub OnStartPage(objScriptingContext As ASPTypeLibrary.ScriptingContext)
    7.     Set m_Application = objScriptingContext.Application
    8.     Set m_Request = objScriptingContext.Request
    9.     Set m_Response = objScriptingContext.Response
    10.     Set m_Session = objScriptingContext.Session
    11. End Sub
    12.  
    13. Public Sub OnEndPage()
    14.     Set m_Application = Nothing
    15.     Set m_Request = Nothing
    16.     Set m_Response = Nothing
    17.     Set m_Session = Nothing
    18. End Sub
    19.  
    20. Public Sub WriteSomething()
    21.     m_Response.Write "<b>Something</b>"
    22. End Sub

    and in global.asa:

    VB Code:
    1. Sub Session_OnStart
    2.     Session ("ConnectionTimeout") = 30
    3.     Session ("CommandTimeout") = 30
    4. End Sub
    5.    
    6. Sub Session_OnEnd
    7.     Session("ConnectionTimeout")= ""
    8.     Session("CommandTimeout")= ""
    9. End Sub
    10.    
    11. Sub Application_OnStart
    12.     Application.Lock
    13.     Application("ConnectionString")= "DSN=MyDB; User ID=sa"
    14.    Application.UnLock
    15. End Sub
    16.    
    17. Sub Application_OnEnd
    18.     Application("ConnectionString")=""
    19. End Sub

    hope that helps
    Last edited by tr0n; Jul 8th, 2002 at 04:31 AM.

  3. #3

    Thread Starter
    Hyperactive Member FATBOYPEE's Avatar
    Join Date
    May 2001
    Location
    Charleville (Ireland) Still. ANYONE GOT A JOB I CAN HAVE ? GIZA JOB. I CAN DO THAT....
    Posts
    463

    Thumbs up

    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
  •  



Click Here to Expand Forum to Full Width