造粒机辊皮:谁能帮我看看这页有什么问题?asp问题
来源:百度文库 编辑:查人人中国名人网 时间:2024/08/31 03:19:44
总是显示出错时显示的那页而不能正常显示该页!
代码如下:<%
Dim username,userid
username = session("wzname")
userid=session("userid")
%>
<%
'获取传值
dim vid
vid=Request.QueryString("id")
IF isNumeric(vid) THEN
vid=CLng(vid)
ELSE
Response.Redirect "resp.asp"
END IF
%>
<%
'读取相应的消息
sqlstr="SELECT u.userID,u.username,u.usersex,m.* FROM [user] AS u INNER JOIN mail AS m ON u.username=m.m_from WHERE m.m_ID="&vid
rs.open sqlstr,conn,1,3
If rs.eof AND rs.bof Then
Response.Redirect "resp.asp?cmd=msg_idmiss"
ElseIf rs("m_to")<>username Then
Response.Redirect "resp.asp?cmd=msg_owner"
End If
%>
<table align="center" width="100%" height="37" border="0" cellspacing="0" cellpadding="0" class="rdd" id="table14">
<tr>
<td width="50%" height="100%" class="rdr"><b>发送人:<% =rs("m_from") %></b>
<td width="50%" height="100%"><b>发送日期:</b><% =rs("m_date") %></td>
</tr>
</table>
<table align="center" width="100%" height="47" border="0" cellspacing="0" cellpadding="0" class="intbl" id="table15">
<tr>
<td width="100%" height="100%" class="rdd"><b>消息标题:</b><% =rs("m_title") %></td>
</tr>
</table>
<table align="center" width="100%" height="25" border="0" cellspacing="0" cellpadding="0" class="intbl" id="table16">
<tr>
<td width="100%" height="100%" valign="top" class="rde"><b>消息内容:</b>
<br><% =rs("m_content") %>
<p align="right">
<a href="msgwr.asp?id=<% =rs("userID") %>">[回消息]</a>
<a href="msgdel.asp?id=<% =vid %>">[删除]</a>
</p>
</td>
</tr>
</table>
代码如下:<%
Dim username,userid
username = session("wzname")
userid=session("userid")
%>
<%
'获取传值
dim vid
vid=Request.QueryString("id")
IF isNumeric(vid) THEN
vid=CLng(vid)
ELSE
Response.Redirect "resp.asp"
END IF
%>
<%
'读取相应的消息
sqlstr="SELECT u.userID,u.username,u.usersex,m.* FROM [user] AS u INNER JOIN mail AS m ON u.username=m.m_from WHERE m.m_ID="&vid
rs.open sqlstr,conn,1,3
If rs.eof AND rs.bof Then
Response.Redirect "resp.asp?cmd=msg_idmiss"
ElseIf rs("m_to")<>username Then
Response.Redirect "resp.asp?cmd=msg_owner"
End If
%>
<table align="center" width="100%" height="37" border="0" cellspacing="0" cellpadding="0" class="rdd" id="table14">
<tr>
<td width="50%" height="100%" class="rdr"><b>发送人:<% =rs("m_from") %></b>
<td width="50%" height="100%"><b>发送日期:</b><% =rs("m_date") %></td>
</tr>
</table>
<table align="center" width="100%" height="47" border="0" cellspacing="0" cellpadding="0" class="intbl" id="table15">
<tr>
<td width="100%" height="100%" class="rdd"><b>消息标题:</b><% =rs("m_title") %></td>
</tr>
</table>
<table align="center" width="100%" height="25" border="0" cellspacing="0" cellpadding="0" class="intbl" id="table16">
<tr>
<td width="100%" height="100%" valign="top" class="rde"><b>消息内容:</b>
<br><% =rs("m_content") %>
<p align="right">
<a href="msgwr.asp?id=<% =rs("userID") %>">[回消息]</a>
<a href="msgdel.asp?id=<% =vid %>">[删除]</a>
</p>
</td>
</tr>
</table>
首先检查一下rs有没有定义;
另外建议你在有可能出错的语句后加上:
response.write("something")
resonse.end()
这样很快就能找到出错的语句,调试起来比较方便