public T GetParamValue<T>(string name, T defValue) { if (string.IsNullOrEmpty(name)) return defValue; try { return (T)Convert.ChangeType(Request[name], typeof(T)); } catch (Exception ex) { return defValue; } }