我做了一个Active Form,想取session里面的session("UserID")="aa",Session值,请各位大哥帮忙

解决方案 »

  1.   

    adoquery1.fieldbyname('userid').asstring;
      

  2.   

    Implements a HTTP response object.TIdHTTPResponseInfo = class(TObject)DescriptionTIdHTTPResponseInfo is a TObject descendant that encapsulates access to information for a HTTP response.TIdHTTPResponseInfo publishes properties that provide access to various information for a HTTP response.These properties include the HTTP session, the authentication realm, Cookies, Headers, and the response content, length, and type.TIdHTTPResponseInfo is used by TIdHTTPServer to prepare a HTTP response for a peer thread request.
      

  3.   

    是页面的session,不是数据库的session.是在客户页面上,我嵌入Active From,然后这个Active Form想取客户页面Session的值
      

  4.   

    给你的不就是怎么去页面的SESSION吗,你以为什么
      

  5.   

    Reponse.Write Session("UserID")
    试试
      

  6.   

    Reponse.Write Session("UserID")
    试试
      

  7.   

    你做的Active Form最后是要下载到客户端的,session是服务器端的变量,虽然它和客户端的cookie有一定的联系,但是我觉得在Active Form里根本就不应该也不能出现Session的概念。
      

  8.   

    我的Active Form是客户端的,因为别人用Asp把数据放在了Session里面,我要用Actice form去取里面的数据
      

  9.   

    客户端取得服务器端的变量的办法就是:把变量的值赋给html里的隐藏字段里,然后在客户端用javascript脚本取出来,赋给你的ActiveX里的属性,这样你就获得了。只有这一个办法,没有其他的了,个人认为。
      

  10.   

    <OBJECT ID="YourActiveX" WIDTH="0" HEIGHT="0" CLASSID="CLSID:753A83A2-3479-437C-83F2-80E2C8265F2B"></OBJECT>
    <INPUT TYPE="hidden" name="H" value="<%=Session("User ID")%>">
    <script language="javascript">
        YourActiveX.YourValue=document.all.H.value; //YourValue假定是你的ActiveX里的一个属性
        alert(YourActiveX.YourValue);
    </script>
    大概就是这个意思,如果你想用你自己的界面就把WIDTH="100" HEIGHT="100"