Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / UI / WebControls / AutoGeneratedFieldProperties.cs / 1 / AutoGeneratedFieldProperties.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System; using System.ComponentModel; using System.Reflection; using System.Security.Permissions; using System.Web.Util; ////// [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class AutoGeneratedFieldProperties : IStateManager { private bool _isTracking; private StateBag _statebag; public AutoGeneratedFieldProperties() { _statebag = new StateBag(); } public string DataField { get { object o = ViewState["DataField"]; if (o != null) { return (string)o; } return String.Empty; } set { ViewState["DataField"] = value; } } public bool IsReadOnly { get { object o = ViewState["IsReadOnly"]; if (o != null) { return (bool)o; } return false; } set { ViewState["IsReadOnly"] = value; } } public string Name { get { object o = ViewState["Name"]; if (o != null) { return (string)o; } return String.Empty; } set { ViewState["Name"] = value; } } public Type Type { get { object o = ViewState["Type"]; if (o != null) { return (Type)o; } return null; } set { ViewState["Type"] = value; } } ////// Stores the properties for an AutoGeneratedField. /// ////// private StateBag ViewState { get { return _statebag; } } #region IStateManager implementation ///Gets the statebag for the AutoGeneratedFieldProperties. This property is read-only. ///bool IStateManager.IsTrackingViewState { get { return _isTracking; } } /// void IStateManager.LoadViewState(object state) { if (state != null) { ((IStateManager)ViewState).LoadViewState(state); } } /// object IStateManager.SaveViewState() { object state = ((IStateManager)ViewState).SaveViewState(); return state; } /// void IStateManager.TrackViewState() { _isTracking = true; ViewState.TrackViewState(); } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System; using System.ComponentModel; using System.Reflection; using System.Security.Permissions; using System.Web.Util; ////// [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class AutoGeneratedFieldProperties : IStateManager { private bool _isTracking; private StateBag _statebag; public AutoGeneratedFieldProperties() { _statebag = new StateBag(); } public string DataField { get { object o = ViewState["DataField"]; if (o != null) { return (string)o; } return String.Empty; } set { ViewState["DataField"] = value; } } public bool IsReadOnly { get { object o = ViewState["IsReadOnly"]; if (o != null) { return (bool)o; } return false; } set { ViewState["IsReadOnly"] = value; } } public string Name { get { object o = ViewState["Name"]; if (o != null) { return (string)o; } return String.Empty; } set { ViewState["Name"] = value; } } public Type Type { get { object o = ViewState["Type"]; if (o != null) { return (Type)o; } return null; } set { ViewState["Type"] = value; } } ////// Stores the properties for an AutoGeneratedField. /// ////// private StateBag ViewState { get { return _statebag; } } #region IStateManager implementation ///Gets the statebag for the AutoGeneratedFieldProperties. This property is read-only. ///bool IStateManager.IsTrackingViewState { get { return _isTracking; } } /// void IStateManager.LoadViewState(object state) { if (state != null) { ((IStateManager)ViewState).LoadViewState(state); } } /// object IStateManager.SaveViewState() { object state = ((IStateManager)ViewState).SaveViewState(); return state; } /// void IStateManager.TrackViewState() { _isTracking = true; ViewState.TrackViewState(); } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CounterSampleCalculator.cs
- EndpointDesigner.cs
- ObjectNavigationPropertyMapping.cs
- PTConverter.cs
- DataRelation.cs
- SiteMapDataSourceDesigner.cs
- EndpointNameMessageFilter.cs
- CustomAttributeBuilder.cs
- KeyedByTypeCollection.cs
- HasActivatableWorkflowEvent.cs
- CryptoProvider.cs
- ExpressionList.cs
- Helper.cs
- LocalizationComments.cs
- HybridCollection.cs
- MimeWriter.cs
- Activation.cs
- QueryHandler.cs
- XsltFunctions.cs
- CorrelationValidator.cs
- RenderOptions.cs
- tooltip.cs
- ToolStripScrollButton.cs
- PrintPreviewGraphics.cs
- DictionaryCustomTypeDescriptor.cs
- PreloadedPackages.cs
- DodSequenceMerge.cs
- GridViewUpdateEventArgs.cs
- XPathDocumentNavigator.cs
- MultiTargetingUtil.cs
- AssemblyFilter.cs
- Image.cs
- RegularExpressionValidator.cs
- WebHttpSecurityModeHelper.cs
- FSWPathEditor.cs
- RuntimeIdentifierPropertyAttribute.cs
- DataSourceView.cs
- SqlSupersetValidator.cs
- RoutedUICommand.cs
- UpdateCommandGenerator.cs
- InstanceLockLostException.cs
- PreloadHost.cs
- HttpCookieCollection.cs
- DeadCharTextComposition.cs
- Quad.cs
- ProviderConnectionPointCollection.cs
- OleDbTransaction.cs
- StringAnimationBase.cs
- CodeAttributeDeclarationCollection.cs
- IntegerValidatorAttribute.cs
- Condition.cs
- ParamArrayAttribute.cs
- BinaryParser.cs
- ConstraintManager.cs
- Literal.cs
- CurrencyWrapper.cs
- RootContext.cs
- IBuiltInEvidence.cs
- GlyphsSerializer.cs
- ViewManager.cs
- UnsafeNativeMethodsCLR.cs
- BooleanProjectedSlot.cs
- NullReferenceException.cs
- MetadataProperty.cs
- ListViewItem.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ErrorTolerantObjectWriter.cs
- OneOfTypeConst.cs
- TypeSystemProvider.cs
- XPathDocumentIterator.cs
- CallbackException.cs
- DetailsViewUpdateEventArgs.cs
- ArraySet.cs
- ScrollItemPattern.cs
- MenuItem.cs
- Constants.cs
- VirtualizingPanel.cs
- Int32AnimationBase.cs
- WorkflowPersistenceService.cs
- PageScaling.cs
- TableRow.cs
- UmAlQuraCalendar.cs
- UpdateException.cs
- NavigationPropertySingletonExpression.cs
- OleDbParameterCollection.cs
- OpCopier.cs
- ConfigurationPropertyAttribute.cs
- TransformGroup.cs
- Point3D.cs
- ArraySortHelper.cs
- LayoutDump.cs
- FieldInfo.cs
- ConnectionManagementSection.cs
- RegexCharClass.cs
- InputBinder.cs
- IsolationInterop.cs
- AmbiguousMatchException.cs
- HijriCalendar.cs
- GlyphRunDrawing.cs
- PolyBezierSegment.cs