日期:2014-05-19  浏览次数:20924 次

Request.Form的问题
用Request.Form接收一个不存在的表单,如何防止出错,
是用if   (Request.Form[ 'nothing ']   ==   null)来判断,或者有其它通用的方法或函数呢

------解决方案--------------------
if(Request.Form[ 'nothing '] != null && Request.Form[ 'nothing '].Trim() != " ")
or
if(null == Request.Form[ 'nothing '] || Request.Form[ 'nothing '].Trim() == " ")