Is it possible to set a session variable from a dll (and cookies as well)?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dim Response As System.Web.HttpResponse =
System.Web.HttpContext.Current.Response
Response.Cookies.Add(New Web.HttpCookie("MyCookie", "MyValue"))
Public Sub Perform_Function(ByVal strFunction as Variant, ByVal aspSession
as Session)
'down in here you can do stuff like
Debug.Print aspSession("somevar")
aspSession("somevar") = "DLL Says Hi Right Back"
End Sub
asp would be
<%
Option Explicit
Dim aspFunction
Dim objSomeDll
Set objSomeDll = Server.CreateObject("YourDLL.SomeNeatClass")
aspFunction = "WHATEVER"
Session("somevar") = "Greetings from ASP Page"
objSomeDll.Perform_Function aspFunction, Session
Response.Write Session("somevar")
Set objSomeDll = Nothing
%>