可以读数据,但不能给session付值
想通过读卡器读入用户数据来登录,能读,但不能给给session付值,本人试过很多,就是不能取到session数据,诚恳各位看看怎么才能给sessionasp语句如下
<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="读卡" /> </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>