本文整理匯總了C#中MonoTests.System.Web.UI.WebControls.ObjectDataSourcePoker.LoadState方法的典型用法代碼示例。如果您正苦於以下問題:C# ObjectDataSourcePoker.LoadState方法的具體用法?C# ObjectDataSourcePoker.LoadState怎麽用?C# ObjectDataSourcePoker.LoadState使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MonoTests.System.Web.UI.WebControls.ObjectDataSourcePoker
的用法示例。
在下文中一共展示了ObjectDataSourcePoker.LoadState方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ObjectDataSource_ViewState
public void ObjectDataSource_ViewState ()
{
ObjectDataSourcePoker ods = new ObjectDataSourcePoker ();
//InitObjectDataSource (ods,"");
ods.CacheDuration = 1;
ods.CacheExpirationPolicy = DataSourceCacheExpiry.Sliding;
ods.CacheKeyDependency = "key";
ods.ConflictDetection = ConflictOptions.CompareAllValues;
ods.ConvertNullToDBNull = true;
ods.DataObjectTypeName = "DataObjectType";
ods.DeleteMethod = "deleteMethod";
ods.EnableCaching = true;
ods.EnablePaging = true;
ods.FilterExpression = "filter expression";
ods.InsertMethod = "insertMethod";
ods.MaximumRowsParameterName = "maxRows";
ods.OldValuesParameterFormatString = "old_{0}";
ods.SelectCountMethod = "selectCountMethod";
ods.SelectMethod = "selectMethod";
ods.SortParameterName = "sortParamName";
ods.SqlCacheDependency = "cacheDependency";
ods.StartRowIndexParameterName = "startRow";
ods.TypeName = "TypeName";
ods.UpdateMethod = "updateMethod";
object state = ods.SaveState ();
Assert.IsNull (state, "ViewState is null");
ObjectDataSourcePoker copy = new ObjectDataSourcePoker ();
copy.LoadState (state);
}