我在尝试使IsNumeric与Request.QueryString正常工作时遇到问题。IsNumeric()不能与Request.QueryString一起使用
的服务器是Windows 2008 R2/IIS7.5
我的代码不能再简单不过:
<%@ LANGUAGE=VBScript %>
<% Response.Write "IsNumeric: " & IsNumeric(Request.QueryString("")) %>
我的URL: http://localhost.com/default2.asp?44hjh
输出: 则IsNumeric:真
如果我更改我的代码到这个,那么我得到期望的结果:
<%@ LANGUAGE=VBScript %>
<% Response.Write "IsNumeric: " & IsNumeric(Request.QueryString("test")) %>
我的URL: http://localhost.com/default2.asp?test=44hjh
输出: 则IsNumeric:假
为什么当我不指定特定的查询字符串的元素也则IsNumeric不行?更重要的是,我该如何解决它?
奇妙的是,你的例子完美的作品!非常感谢,谢谢:) – Rich 2013-05-02 15:24:33
@Rich - np,很高兴我能帮上忙! – sgeddes 2013-05-02 15:36:03