Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / AutoGeneratedFieldProperties.cs / 1305376 / AutoGeneratedFieldProperties.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System; using System.ComponentModel; using System.Reflection; using System.Web.Util; ////// 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.Web.Util; ////// 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
- PrintDialogException.cs
- localization.cs
- ModelTypeConverter.cs
- DynamicQueryableWrapper.cs
- UpdatePanel.cs
- ColorContext.cs
- Cursor.cs
- BinaryParser.cs
- SpnEndpointIdentityExtension.cs
- ScrollChrome.cs
- Profiler.cs
- Misc.cs
- LocatorBase.cs
- WindowsIPAddress.cs
- _ShellExpression.cs
- SessionStateContainer.cs
- SqlIdentifier.cs
- CacheHelper.cs
- BaseParaClient.cs
- DesignerExtenders.cs
- ViewManagerAttribute.cs
- RectAnimation.cs
- ResourceCategoryAttribute.cs
- UpDownBaseDesigner.cs
- StorageEntityTypeMapping.cs
- BoolExpression.cs
- UnmanagedMemoryStreamWrapper.cs
- _ScatterGatherBuffers.cs
- Color.cs
- ManipulationVelocities.cs
- TagMapCollection.cs
- NoneExcludedImageIndexConverter.cs
- StatusBarDrawItemEvent.cs
- XmlCharacterData.cs
- Utility.cs
- EventHandlersStore.cs
- WeakReference.cs
- BitConverter.cs
- hresults.cs
- SettingsBindableAttribute.cs
- IDataContractSurrogate.cs
- TextTreeText.cs
- BaseCodeDomTreeGenerator.cs
- Win32PrintDialog.cs
- ResourceKey.cs
- XmlDictionary.cs
- WebServiceMethodData.cs
- UnknownWrapper.cs
- ThreadSafeList.cs
- XmlSerializableServices.cs
- NotSupportedException.cs
- TemplateControlBuildProvider.cs
- SystemIPv6InterfaceProperties.cs
- ExpressionBinding.cs
- WebPartDescriptionCollection.cs
- SmtpNetworkElement.cs
- DesignTimeParseData.cs
- LockCookie.cs
- WebServiceReceive.cs
- RoleService.cs
- ObjectDataSourceMethodEditor.cs
- DebuggerAttributes.cs
- ParallelTimeline.cs
- ProcessHostConfigUtils.cs
- AddInSegmentDirectoryNotFoundException.cs
- ProfileManager.cs
- AttributeUsageAttribute.cs
- Sequence.cs
- TextBox.cs
- SizeConverter.cs
- remotingproxy.cs
- RecognizerInfo.cs
- SmtpSection.cs
- TableMethodGenerator.cs
- LocalBuilder.cs
- UriSectionData.cs
- RoutingBehavior.cs
- AppDomainManager.cs
- KeyValuePair.cs
- ConnectionManager.cs
- ButtonStandardAdapter.cs
- SoapDocumentServiceAttribute.cs
- Ipv6Element.cs
- CultureTableRecord.cs
- WindowsSolidBrush.cs
- InplaceBitmapMetadataWriter.cs
- DependencyPropertyChangedEventArgs.cs
- ButtonAutomationPeer.cs
- XmlSchemaImport.cs
- ActiveXMessageFormatter.cs
- BmpBitmapDecoder.cs
- APCustomTypeDescriptor.cs
- WebControl.cs
- Odbc32.cs
- XmlHierarchicalDataSourceView.cs
- ManipulationInertiaStartingEventArgs.cs
- WebPartVerb.cs
- ColumnTypeConverter.cs
- GlyphCache.cs
- TraceEventCache.cs