/// <summary> /// 从ViewState中获取某属性值,如果为空则返回默认值nullValue /// </summary> /// <typeparam name="V">属性类型</typeparam> /// <param name="propertyName">属性名称</param> /// <param name="nullValue">默认值</param> /// <returns>属性值</returns> protected V GetPropertyValue <V>(string propertyName, V nullValue) { return(ViewState.GetViewStateValue <V>(propertyName, nullValue)); }