奇怪的ASP错误 [英] Weird ASP Error
问题描述
大家好,
我有一个奇怪的错误,不知道用什么词来搜索
google。很抱歉打扰。
我的字段中有数据M_BIO
当我运行此代码<%= rslist.Fields时.Item(M_bio)。值%>,它
显示数据,没问题。
当我使用此代码时:
<%如果rslist.Fields.Item(" M_bio")。值<> ""然后
response.Write(" Testing")
结束如果%>
显示''testing'' ,没有probs。
但是当我运行这段代码时:
<%if rslist.Fields.Item(" M_bio")。Value< > ""然后
response.Write(rslist.Fields.Item(" M_Bio")。Value)
结束IF%>
它什么也没显示,页面显示没有错误。有谁知道
的原因。
帮助将不胜感激。
REgards
Roger
Hello people,
I am having a weird error and don''t know what term to search in
google. Sorry to bother.
There is data in my field "M_BIO"
When I run this code <%=rslist.Fields.Item("M_bio").Value%>, it
displays the data, no problem.
When I used this code:
<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write("Testing")
End If %>
It displays ''testing'', no probs.
But when I run this code:
<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Value)
End IF %>
It displays nothing, the page shows no error. Does anyone know the
reason.
Help would be appreciated.
REgards
Roger
推荐答案
这是做什么的?
<%
如果是rslist.Fields.Item (M_bio)。值<> ""然后
response.Write(rslist.Fields.Item(" M_Bio")。Value)
Else
"嗯空值。必须是其他的东西在这里。
结束IF
%>
你有错误吗?在代码中继续下一步?如果是这样,请确保你在调试时发表评论。
雷在工作
" HelLind" ; < U8 ****** @ cc.nctu.edu.tw>在消息中写道
news:9a ************************** @ posting.google.c om ...
What does this do?
<%
If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Value)
Else
"Hmm empty value. Must be something else going on here."
End IF
%>
And do you have an On Error Resume Next in your code? If so, be sure you
comment it out while debugging.
Ray at work
"HelLind" <u8******@cc.nctu.edu.tw> wrote in message
news:9a**************************@posting.google.c om...
大家好,
我有一个奇怪的错误,不知道在谷歌搜索什么术语。很抱歉打扰。
我的字段中有数据M_BIO
当我运行此代码<%= rslist.Fields.Item(" M_bio")时.Value%>,它显示数据,没问题。
当我使用此代码时:
<%如果rslist.Fields.Item(" M_bio" ).Value<> ""那么
response.Write(" Testing")
结束如果%>
它显示''测试'',没有probs。
但是当我跑此代码:
<%如果rslist.Fields.Item(" M_bio")。值<> ""然后
response.Write(rslist.Fields.Item(" M_Bio"。)。Value)
结束IF%>
它什么都不显示,页面显示没有错误。有谁知道
的原因。
帮助将不胜感激。
REgards
Roger
Hello people,
I am having a weird error and don''t know what term to search in
google. Sorry to bother.
There is data in my field "M_BIO"
When I run this code <%=rslist.Fields.Item("M_bio").Value%>, it
displays the data, no problem.
When I used this code:
<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write("Testing")
End If %>
It displays ''testing'', no probs.
But when I run this code:
<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Value)
End IF %>
It displays nothing, the page shows no error. Does anyone know the
reason.
Help would be appreciated.
REgards
Roger
" HelLind" < U8 ****** @ cc.nctu.edu.tw>在消息中写道
news:9a ************************** @ posting.google.c om ...
"HelLind" <u8******@cc.nctu.edu.tw> wrote in message
news:9a**************************@posting.google.c om...
大家好,
我有一个奇怪的错误,不知道在谷歌搜索什么术语。很抱歉打扰。
我的字段中有数据M_BIO
当我运行此代码<%= rslist.Fields.Item(" M_bio")时.Value%>,它显示数据,没问题。
当我使用此代码时:
<%如果rslist.Fields.Item(" M_bio" ).Value<> ""那么
response.Write(" Testing")
结束如果%>
它显示''测试'',没有probs。
但是当我跑此代码:
<%如果rslist.Fields.Item(" M_bio")。值<> ""然后
response.Write(rslist.Fields.Item(" M_Bio"。)。Value)
结束IF%>
它什么都不显示,页面显示没有错误。有没有人知道
的原因。
Hello people,
I am having a weird error and don''t know what term to search in
google. Sorry to bother.
There is data in my field "M_BIO"
When I run this code <%=rslist.Fields.Item("M_bio").Value%>, it
displays the data, no problem.
When I used this code:
<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write("Testing")
End If %>
It displays ''testing'', no probs.
But when I run this code:
<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Value)
End IF %>
It displays nothing, the page shows no error. Does anyone know the
reason.
我怀疑它有一个NULL值?也许试试这个:
<%If Len(rslist.Fields.Item(" M_bio")。Value)> 0然后
Response.Write(" Testing")
结束如果
%>
问候,
Peter Foti
I suspect it has a NULL value? Perhaps try this instead:
<% If Len(rslist.Fields.Item("M_bio").Value) > 0 Then
Response.Write("Testing")
End If
%>
Regards,
Peter Foti
2004年3月15日09:57:06 -0800, u8 ****** @ cc.nctu.edu.tw (HelLind)
写道:
On 15 Mar 2004 09:57:06 -0800, u8******@cc.nctu.edu.tw (HelLind)
wrote:
大家好,
我有一个奇怪的错误,不知道在谷歌搜索什么术语。很抱歉打扰。
我的字段中有数据M_BIO
当我运行此代码<%= rslist.Fields.Item(" M_bio")时.Value%>,它显示数据,没问题。
当我使用此代码时:
<%如果rslist.Fields.Item(" M_bio" ).Value<> ""那么
response.Write(" Testing")
结束如果%>
它显示''测试'',没有probs。
但是当我跑此代码:
<%如果rslist.Fields.Item(" M_bio")。值<> ""然后
response.Write(rslist.Fields.Item(" M_Bio")。Valu e)
结束IF%>
它什么都不显示,页面显示没有错误。有没有人知道
的原因。
Hello people,
I am having a weird error and don''t know what term to search in
google. Sorry to bother.
There is data in my field "M_BIO"
When I run this code <%=rslist.Fields.Item("M_bio").Value%>, it
displays the data, no problem.
When I used this code:
<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write("Testing")
End If %>
It displays ''testing'', no probs.
But when I run this code:
<% If rslist.Fields.Item("M_bio").Value <> "" then
response.Write(rslist.Fields.Item("M_Bio").Valu e)
End IF %>
It displays nothing, the page shows no error. Does anyone know the
reason.
如果它有一个空值,这是预期的。 :)
或者我想如果它是一串空格。您是否在IF / THEN segement中使用Response.Writes尝试使用
进行调试?类似于:
<%
Response.Write rslist.Fields.Item(" M_bio")。Value& "< br>"
如果rslist.Fields.Item(" M_bio")。Value<> ""然后
Response.Write"值不为空< br>"
response.Write(rslist.Fields.Item(" M_Bio")。Value)
结束IF
%>
If it had a null value this would be expected. :)
Or I guess if it were a string of spaces. Have you tried debugging by
using Response.Writes in your IF/THEN segement? Something like:
<%
Response.Write rslist.Fields.Item("M_bio").Value & "<br>"
If rslist.Fields.Item("M_bio").Value <> "" then
Response.Write "Value is not empty<br>"
response.Write(rslist.Fields.Item("M_Bio").Value)
End IF
%>
这篇关于奇怪的ASP错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!