回 帖 发 新 帖 刷新版面

主题:参数传递的问题

<%if not (rsuser.eof and rsuser.bof) then
 do while not rsuser.eof
%>
</tr>
<tronMouseover="this.style.background='#FDE8FE';"onMouseOut="this.style.background='#ffffff';" align="center">
    <td><%=rsuser("userID")%></td>
    <td><%=rsuser("username")%></td>
    <td><%=rsuser("sex")%></td>
    <td><%=rsuser("email")%></td>
    <td><%=rsuser("Comane")%></td>
    <td><% if rsuser("lockuser")="ture" then response.Write"<font color=#ff0000>异常</font>" else response.Write"正常"%></td>
    <td>
<%if rsuser("lockuser")="ture" then 
   response.Write"【<a href=P_user_edit.aspaction=unlock&id="&("username")&">解锁</a>】"
else
    response.Write"【<a href=P_user_edit.asp?action=lock&id="&rsuser("username")&">锁定</a>】"
end if
%>
   </td>
 </tr> 
<% rsuser.movenext
   loop
   end if%>
==========================================================================


response.Write"【<a href=P_user_edit.aspaction=unlock&id="&rsuser("username")&">解锁</a>】"这两个参数能传也能被收到,else后面的第二个参数能传过去吗?我写了一个测试好像只有action=lock能传,id="&rsuser("username")&"这个好像传不过去,是怎么回事?
我是用id=request.QueryString("id")来接收的.请大家帮我解决一下,先谢谢了.

回复列表 (共4个回复)

沙发

response.Write"【<a href=P_user_edit.asp?action=unlock&id="&rsuser("username")&">解锁</a>】"
少了一个?

板凳

我的意思是上面的"解锁"的两个参数都能传,下的那个"锁定"只能传一个action.那个ID传不过去.

3 楼

response.Write"【<a href='P_user_edit.aspaction=unlock&id="&rsuser("username")&"'>解锁</a>】"

4 楼

问题已解决,错误的原因:
 ASP中的HTML语言要标准,不标准有时会出现意想不到的错误.

我来回复

您尚未登录,请登录后再回复。点此登录或注册