我要检查是否有对URI请求的参数。
I need to check if there is a param on the uri request.
所以,我需要检查,如果该参数设置。是否有.NET函数/ C#?
So I need to check if that param is set. Is there a function on .NET/C#?
这是未设置值为null或空:
An unset value will be null or empty:
value = Request["param"];
if (String.IsNullOrEmpty(value))
{
// param is not set
}
如果该PARAM NAME是在查询字符串,但该值不是,这将是空的。如果名字不在查询字符串,其值将为空。例如,
If the param name is in the query string but the value is not, it will be empty. If the name is not in the query string, the value will be null. For example.
¶m1=¶m2=value
// Request["param1"] is String.Empty
// Request["param3"] is null
上一篇:机器人 - 允许的背景可拉伸只有一个特定的区域伸展只有一个、机器人、背景、区域
下一篇:"如何是" Android应用程序(脸谱等)安装到Android手机?脸谱、应用程序、手机、QUOT