当地址栏没有参数"id"时:
request.querystring["id"] == null
convert.tostring(request.querystring["id"]) == null
注意这样会出错:
request.querystring["id"].tostring();
当地址栏有参数"id",但没有赋值的时候:
request.querystring["id"] == ""
request.querystring["id"] == string.empty
convert.tostring(request.querystring["id"]) == ""
convert.tostring(request.querystring["id"]) == string.empty
同时判断二个条件的时候:
if ("" + request.querystring["id"] == "") {...}
if (("" + request.querystring["id"]).length == 0) {...}
出处:近水楼台 blog
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!


