Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- MetadataArtifactLoaderCompositeResource.cs
- StaticDataManager.cs
- infer.cs
- TimelineCollection.cs
- RootBrowserWindow.cs
- BidirectionalDictionary.cs
- UInt32Storage.cs
- OrthographicCamera.cs
- ResourceReferenceExpressionConverter.cs
- RelationshipManager.cs
- EntityDesignerDataSourceView.cs
- RegexCode.cs
- ContentDisposition.cs
- ShaderEffect.cs
- SessionStateContainer.cs
- AuthStoreRoleProvider.cs
- PrintControllerWithStatusDialog.cs
- _PooledStream.cs
- SocketException.cs
- EventsTab.cs
- DeclarationUpdate.cs
- XsltException.cs
- DuplicateDetector.cs
- DataSourceCache.cs
- VectorCollectionConverter.cs
- DependencyPropertyKey.cs
- CompilerLocalReference.cs
- CommandManager.cs
- ScriptMethodAttribute.cs
- RectangleF.cs
- DefaultBindingPropertyAttribute.cs
- FacetChecker.cs
- Int32AnimationBase.cs
- DayRenderEvent.cs
- FlowDocumentPage.cs
- XamlSerializerUtil.cs
- InvokeMethod.cs
- SimpleBitVector32.cs
- GlyphRunDrawing.cs
- ProxyWebPart.cs
- InstanceKeyNotReadyException.cs
- ContentDisposition.cs
- HeaderPanel.cs
- WindowsPrincipal.cs
- FrameworkReadOnlyPropertyMetadata.cs
- PointKeyFrameCollection.cs
- ChildDocumentBlock.cs
- RuntimeArgumentHandle.cs
- MonthCalendarDesigner.cs
- Int16AnimationBase.cs
- UserControlParser.cs
- InProcStateClientManager.cs
- ErrorTableItemStyle.cs
- PerspectiveCamera.cs
- SoapIncludeAttribute.cs
- MethodBuilderInstantiation.cs
- DebuggerAttributes.cs
- ReversePositionQuery.cs
- SHA512.cs
- DbXmlEnabledProviderManifest.cs
- ExecutionEngineException.cs
- IndexingContentUnit.cs
- MobileUserControlDesigner.cs
- QilStrConcat.cs
- MembershipValidatePasswordEventArgs.cs
- SQLByteStorage.cs
- ComponentDispatcher.cs
- FilterException.cs
- DoubleCollection.cs
- HttpCookiesSection.cs
- DataSourceXmlSerializationAttribute.cs
- XmlElementList.cs
- FieldToken.cs
- DBConnectionString.cs
- Literal.cs
- LocalizationComments.cs
- SctClaimSerializer.cs
- ToolStripContentPanel.cs
- LogConverter.cs
- SamlSubject.cs
- RadioButton.cs
- SQLDoubleStorage.cs
- TrackingStringDictionary.cs
- ProcessModelSection.cs
- EventProviderTraceListener.cs
- ExtenderProviderService.cs
- GcSettings.cs
- AmbientEnvironment.cs
- XmlSchemaDatatype.cs
- tooltip.cs
- SmiEventSink_DeferedProcessing.cs
- StateFinalizationDesigner.cs
- ItemCheckEvent.cs
- RequiredFieldValidator.cs
- TraceUtility.cs
- XmlDeclaration.cs
- SoapFaultCodes.cs
- NotifyIcon.cs
- XamlContextStack.cs
- EastAsianLunisolarCalendar.cs