Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / UI / WebControls / AutoGeneratedFieldProperties.cs / 5 / 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
- AdapterUtil.cs
- SqlNodeAnnotations.cs
- Figure.cs
- DayRenderEvent.cs
- XmlDocumentSchema.cs
- AssertHelper.cs
- StorageScalarPropertyMapping.cs
- codemethodreferenceexpression.cs
- DependencyPropertyKey.cs
- ByteConverter.cs
- XXXOnTypeBuilderInstantiation.cs
- ConvertBinder.cs
- Underline.cs
- SystemNetHelpers.cs
- WorkflowIdleElement.cs
- IDQuery.cs
- BoundField.cs
- DbInsertCommandTree.cs
- HTTPNotFoundHandler.cs
- ResourceExpressionEditor.cs
- control.ime.cs
- Activity.cs
- SpeechAudioFormatInfo.cs
- RowSpanVector.cs
- SqlGenericUtil.cs
- FileVersionInfo.cs
- XmlJsonReader.cs
- MessageBodyDescription.cs
- SqlAggregateChecker.cs
- QilReference.cs
- ToolboxDataAttribute.cs
- SubMenuStyleCollection.cs
- InternalRelationshipCollection.cs
- CriticalFinalizerObject.cs
- EmbossBitmapEffect.cs
- AttributeQuery.cs
- TableRowGroupCollection.cs
- StylusCollection.cs
- UpdateManifestForBrowserApplication.cs
- SqlHelper.cs
- WebConfigurationManager.cs
- ColumnBinding.cs
- ChannelTracker.cs
- CodeIterationStatement.cs
- Internal.cs
- DataGridViewBand.cs
- ValueConversionAttribute.cs
- BitmapEffectrendercontext.cs
- RoleGroup.cs
- Set.cs
- PolyLineSegment.cs
- EnvelopedSignatureTransform.cs
- QueryOperator.cs
- ParserStreamGeometryContext.cs
- SmtpFailedRecipientsException.cs
- DataSourceXmlSubItemAttribute.cs
- SelfSignedCertificate.cs
- EncoderExceptionFallback.cs
- XamlTypeMapperSchemaContext.cs
- TableColumn.cs
- AutoFocusStyle.xaml.cs
- RootDesignerSerializerAttribute.cs
- FillRuleValidation.cs
- TextSelectionProcessor.cs
- ObjectDataSourceEventArgs.cs
- mactripleDES.cs
- XmlSortKeyAccumulator.cs
- FontFaceLayoutInfo.cs
- AttributeQuery.cs
- ThrowHelper.cs
- SessionStateContainer.cs
- HiddenFieldPageStatePersister.cs
- SqlAliasesReferenced.cs
- SelectiveScrollingGrid.cs
- Panel.cs
- SharedStatics.cs
- LiteralTextContainerControlBuilder.cs
- ContextActivityUtils.cs
- IpcManager.cs
- HttpDebugHandler.cs
- TabItemWrapperAutomationPeer.cs
- ShapingWorkspace.cs
- ExpandCollapsePattern.cs
- MimeTypeAttribute.cs
- ExternalFile.cs
- ExceptionUtil.cs
- QilExpression.cs
- BindableTemplateBuilder.cs
- pingexception.cs
- RewritingValidator.cs
- CompiledRegexRunnerFactory.cs
- TreeNodeCollection.cs
- RetrieveVirtualItemEventArgs.cs
- ModulesEntry.cs
- XmlDataProvider.cs
- AssertSection.cs
- Queue.cs
- HttpDebugHandler.cs
- DistributedTransactionPermission.cs
- DataMisalignedException.cs