jru*_*ell 22
未设置的值将为null或空:
value = Request["param"];
if (String.IsNullOrEmpty(value))
{
// param is not set
}
Run Code Online (Sandbox Code Playgroud)
如果参数名称在查询字符串中但值不是,则它将为空.如果名称不在查询字符串中,则该值将为null.例如.
¶m1=¶m2=value
// Request["param1"] is String.Empty
// Request["param3"] is null
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
31557 次 |
| 最近记录: |