Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebControls / AutoGeneratedFieldProperties.cs / 2 / 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. //------------------------------------------------------------------------------ // // 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Mappings.cs
- XamlClipboardData.cs
- ElementHostAutomationPeer.cs
- RemoteWebConfigurationHostServer.cs
- FixedTextSelectionProcessor.cs
- CompoundFileReference.cs
- SafeFileMapViewHandle.cs
- BreakRecordTable.cs
- Compress.cs
- NavigationFailedEventArgs.cs
- cryptoapiTransform.cs
- ListenUriMode.cs
- Certificate.cs
- LogEntryDeserializer.cs
- DeliveryStrategy.cs
- HttpConfigurationSystem.cs
- TrackingAnnotationCollection.cs
- UInt32Storage.cs
- ValidatingCollection.cs
- XmlSchemaSimpleContent.cs
- HwndKeyboardInputProvider.cs
- XmlToDatasetMap.cs
- WorkingDirectoryEditor.cs
- ResourceWriter.cs
- FieldBuilder.cs
- AutoGeneratedFieldProperties.cs
- DateTimePicker.cs
- SHA512Managed.cs
- PageCatalogPart.cs
- COM2ExtendedUITypeEditor.cs
- XmlSchemaComplexType.cs
- TrackingStringDictionary.cs
- BitmapEffectrendercontext.cs
- WindowsTokenRoleProvider.cs
- ExternalCalls.cs
- OdbcParameter.cs
- LinkButton.cs
- XmlTextEncoder.cs
- TabControl.cs
- IntSecurity.cs
- SemaphoreFullException.cs
- WebPartConnectionsCloseVerb.cs
- PolicyManager.cs
- TextBoxView.cs
- SqlDataSourceStatusEventArgs.cs
- HttpResponseInternalWrapper.cs
- Point3DAnimationUsingKeyFrames.cs
- SpeechSynthesizer.cs
- SpoolingTaskBase.cs
- StringKeyFrameCollection.cs
- ImageCodecInfoPrivate.cs
- DiscoveryClientReferences.cs
- MailDefinition.cs
- WindowsComboBox.cs
- CallbackValidatorAttribute.cs
- ClientEventManager.cs
- Switch.cs
- NavigatorInput.cs
- ObjectParameterCollection.cs
- PropertyPath.cs
- ServiceActivationException.cs
- WindowsAuthenticationEventArgs.cs
- DocumentsTrace.cs
- SurrogateDataContract.cs
- LayoutInformation.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- SizeChangedInfo.cs
- SaveFileDialog.cs
- CompilerParameters.cs
- XmlSchemaType.cs
- ControlBuilder.cs
- DependencyPropertyHelper.cs
- OracleBoolean.cs
- XmlDigitalSignatureProcessor.cs
- EntityDataSourceDataSelection.cs
- BlurEffect.cs
- MimeWriter.cs
- PageAdapter.cs
- RijndaelManagedTransform.cs
- UriSection.cs
- Serializer.cs
- TableLayoutSettingsTypeConverter.cs
- DataGridViewCellStyleChangedEventArgs.cs
- RawTextInputReport.cs
- DrawingContextDrawingContextWalker.cs
- MasterPageParser.cs
- DataGridViewTextBoxCell.cs
- ReaderWriterLockWrapper.cs
- CompilationPass2Task.cs
- ImageIndexConverter.cs
- HtmlGenericControl.cs
- Inline.cs
- DataGridViewCheckBoxCell.cs
- FacetEnabledSchemaElement.cs
- DtrList.cs
- ExpressionBindingsDialog.cs
- CngUIPolicy.cs
- TransactionFlowElement.cs
- CoTaskMemHandle.cs
- AcceptorSessionSymmetricMessageSecurityProtocol.cs