-
passing a session level variable into a OCX in a asp page
hi all,
i met a problem, i want to pass a session level variable into a activex control
in a asp page, like this:
--------------
<%@ LANGUAGE="VBSCRIPT"%>
<%Response.Expires = 0 %>
<HTML>
<TITLE>Test Page</TITLE>
<BODY >
<% dim sID
sID = Session("ItemID") <<<--this one is not blank because i init it before
%>
<OBJECT ID="ctlMyControl" WIDTH=314 HEIGHT=120
CLASSID="CLSID:ACA21CCA-74D8-11D2-BE58-0008C71AD826"
CODEBASE="MyControl.CAB#version=1,0,0,40" >
</OBJECT>
<SCRIPT LANGUAGE="VBScript">
sub window_onload()
on error resume next
ctlLicenceGenerator.ItemID = <%=Session("sItemID")%> <<<-- this is blank
if err.number <> 0 then document.location.href = "../Main.ASP"
call ctlLicenceGenerator.Init()
if err.number <> 0 then document.location.href = "../Main.ASP"
end sub
</Script>
</HTML>
---------------------
but when i check the value ItemID in the ocx, it's still blank. i also notice
the variable sID is not blank.
so how can i pass the value of a session variable into a ocx in the asp page?
thanks!
Jack
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks