标题:可以读数据,但不能给session付值
取消只看楼主
glqzygl55
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2010-7-30
结帖率:0
已结贴  问题点数:20 回复次数:0 
可以读数据,但不能给session付值
想通过读卡器读入用户数据来登录,能读,但不能给给session付值,本人试过很多,就是不能取到session数据,诚恳各位看看怎么才能给session
asp语句如下
<html chaset="gb2312">

<object classid="clsid:379C0372-F5F0-4425-B47B-BE84B107D0AB" codebase="lzcard.cab#version=1,0,0,2"
    id="DC_OCX" width="0" height="0" align="center" hspace="0" vspace="0" visible="false">
    <param name="DoubleBuffered" value="0">
    <param name="Enabled" value="-1">
    <param name="Visible" value="-1">
</object>
<body>
    <form id="form1" method="post" action="login.asp"runat="server">
    <div>
        <table width="50%" class="table">
            <tr>
                <td width="228">
                    <img src="Logo.jpg" />                </td>
                <td colspan="3" class="style9">
                    D8读卡器OCX接口测试Demo                </td>
            </tr>
            <tr align="left">
                <td class="style3">
                    端口:                </td>
                <td colspan="2" class="style7"><select name="select" class="ComSelect" id="ComSelect">
                  <option>COM1</option>
                  <option>COM2</option>
                  <option>COM3</option>
                  <option>COM4</option>
                </select></td>
              <td width="846" align="center" class="style7"><input name="button" type="button" class="btnStyle" id="btnReadCard" onClick="ReadCard()" value="读卡" />                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
            </tr>
            <tr>
                <td class="style3">
                    卡号:                </td>
                <td colspan="3" align="left" class="style7">
                    <input id="txtCardNo" type="text" class="txtStyle" />                </td>
            </tr>
            <tr>
                <td class="style3">
                    渠道号:                </td>
                <td colspan="3" align="left" class="style7">
                    <input id="txtChannelNo" type="text" class="txtStyle" />                </td>
            </tr>
            <tr>
                <td class="style3">
                    机构代码:                </td>
                <td colspan="3" align="left" class="style7">
                    <input id="txtOrganNo" type="text" class="txtStyle" />                </td>
            </tr>
            <tr>
                <td class="style3">
                    用户代码:                </td>
                <td colspan="3" align="left" class="style7">
                    <input id="txtUserNo" type="text" class="txtStyle" />                </td>
            </tr>
            <tr>
                <td class="style3">
                    用户密码:                </td>
                <td colspan="3" align="left" class="style7">
                    <input id="txtUserPwd" type="text" class="txtStyle" />                </td>
            </tr>
            <tr>
                <td class="style3">
                    操作信息:                </td>
                <td colspan="3" align="left" class="style7">
                    <input id="txtErrMsg" type="text" class="txtStyle" />                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>

<script language="vbscript">

'读卡操作
  function ReadCard()
   Dim ErrMsg,CardNo,ChannelNo,OrganNo,UserNo,UserPWD,ComPort
   Dim iResult,vsales_channel,vsales_code
  
   ComPort =
   
   iResult =  DC_OCX.ReadCard(ComPort,CardNo,ChannelNo,OrganNo,UserNo,UserPWD,ErrMsg)
   
   if iResult = 0 then
     form1.txtCardNo.value = CardNo
     form1.txtChannelNo.Value =ChannelNo
     form1.txtOrganNo.value=OrganNo
     form1.txtUserNo.value=UserNo
     form1.txtUserPWD.value=UserPWD
     form1.test.value=UserPWD
session(cardno)=carno     --取不到数
   end if
   
   form1.txtErrMsg.value=ErrMsg
  end function
  
</script>
搜索更多相关主题的帖子: session 数据 
2010-07-30 16:52



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-314421-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.185069 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved