Exemple #1
0
 /// <summary>
 /// 获得指定表单参数的float类型值
 /// </summary>
 /// <param name="strName">表单参数</param>
 /// <param name="defValue">缺省值</param>
 /// <returns>表单参数的float类型值</returns>
 public static float GetFormFloat(string strName, float defValue)
 {
     return(Cast.ToFloat(HttpContext.Current.Request.Form[strName]));
 }
Exemple #2
0
 /// <summary>
 /// 获得指定表单参数的int类型值
 /// </summary>
 /// <param name="strName">表单参数</param>
 /// <param name="defValue">缺省值</param>
 /// <returns>表单参数的int类型值</returns>
 public static int GetFormInt(string strName, int defValue)
 {
     return(Cast.ToInteger(HttpContext.Current.Request.Form[strName]));
 }
Exemple #3
0
 /// <summary>
 /// 获得指定Url参数的float类型值
 /// </summary>
 /// <param name="strName">Url参数</param>
 /// <param name="defValue">缺省值</param>
 /// <returns>Url参数的int类型值</returns>
 public static float GetQueryFloat(string strName, float defValue)
 {
     return(Cast.ToFloat(HttpContext.Current.Request.QueryString[strName]));
 }
Exemple #4
0
 /// <summary>
 /// 获得指定Url参数的int类型值
 /// </summary>
 /// <param name="strName">Url参数</param>
 /// <param name="defValue">缺省值</param>
 /// <returns>Url参数的int类型值</returns>
 public static int GetQueryInt(string strName, int defValue)
 {
     return(Cast.ToInteger(HttpContext.Current.Request.QueryString[strName], defValue));
 }