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
- ToolStripButton.cs
- InvalidProgramException.cs
- HostingEnvironmentSection.cs
- UpdateExpressionVisitor.cs
- mansign.cs
- DetailsView.cs
- ValidationResults.cs
- OrderingExpression.cs
- Bookmark.cs
- StateDesigner.TransitionInfo.cs
- TreeNodeCollection.cs
- TransportSecurityProtocolFactory.cs
- baseaxisquery.cs
- HTTPNotFoundHandler.cs
- FormParameter.cs
- DropShadowEffect.cs
- OptimalBreakSession.cs
- VolatileEnlistmentMultiplexing.cs
- MailBnfHelper.cs
- GlobalizationAssembly.cs
- DispatcherExceptionEventArgs.cs
- SqlResolver.cs
- LabelDesigner.cs
- MenuItemStyleCollectionEditor.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- ForAllOperator.cs
- ObjectConverter.cs
- XmlBoundElement.cs
- SecurityException.cs
- MulticastOption.cs
- TrackingQuery.cs
- RuntimeEnvironment.cs
- TypeForwardedFromAttribute.cs
- HttpSysSettings.cs
- FileBasedResourceGroveler.cs
- WebResourceAttribute.cs
- TextSelection.cs
- DataGridViewCellCollection.cs
- SerializationEventsCache.cs
- RtfFormatStack.cs
- ResourceType.cs
- _FtpDataStream.cs
- EraserBehavior.cs
- SystemFonts.cs
- UdpMessageProperty.cs
- MergablePropertyAttribute.cs
- ServiceNameElement.cs
- TableRow.cs
- Configuration.cs
- MenuItemBinding.cs
- AutomationElement.cs
- KnownColorTable.cs
- CounterSample.cs
- ReflectTypeDescriptionProvider.cs
- ByteBufferPool.cs
- OperationSelectorBehavior.cs
- HtmlControlPersistable.cs
- SecurityRuntime.cs
- TextSchema.cs
- ExpressionBuilder.cs
- SymbolPair.cs
- CatalogPartChrome.cs
- Transactions.cs
- DesignDataSource.cs
- MexHttpsBindingElement.cs
- ToolboxDataAttribute.cs
- PbrsForward.cs
- ObjectDataSourceEventArgs.cs
- WindowsFormsSectionHandler.cs
- ReceiveContent.cs
- FormConverter.cs
- CodeLabeledStatement.cs
- BinaryCommonClasses.cs
- ComplexPropertyEntry.cs
- FixedHighlight.cs
- Pointer.cs
- ItemsChangedEventArgs.cs
- DrawingGroupDrawingContext.cs
- WorkflowOperationAsyncResult.cs
- ProcessModelInfo.cs
- FileChangesMonitor.cs
- ZipIORawDataFileBlock.cs
- GeneralTransformGroup.cs
- SchemaImporter.cs
- DateTimeOffsetAdapter.cs
- SqlStatistics.cs
- CompilerInfo.cs
- GetPageNumberCompletedEventArgs.cs
- ServiceHttpHandlerFactory.cs
- EqualityArray.cs
- XmlSchemaObjectCollection.cs
- FormViewRow.cs
- PixelFormats.cs
- DataPager.cs
- AuthorizationContext.cs
- XmlSerializerImportOptions.cs
- GPStream.cs
- XmlIncludeAttribute.cs
- TriggerCollection.cs
- FormattedTextSymbols.cs