Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / UI / ViewStateModeByIdAttribute.cs / 1 / ViewStateModeByIdAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Web.UI { using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Security.Permissions; [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] [AttributeUsage(AttributeTargets.Class)] public sealed class ViewStateModeByIdAttribute : Attribute { static Hashtable _viewStateIdTypes = Hashtable.Synchronized(new Hashtable()); public ViewStateModeByIdAttribute() { } internal static bool IsEnabled(Type type) { if (!_viewStateIdTypes.ContainsKey(type)) { System.ComponentModel.AttributeCollection attrs = TypeDescriptor.GetAttributes(type); ViewStateModeByIdAttribute attr = (ViewStateModeByIdAttribute)attrs[typeof(ViewStateModeByIdAttribute)]; _viewStateIdTypes[type] = (attr != null); } return (bool)_viewStateIdTypes[type]; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Web.UI { using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Security.Permissions; [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] [AttributeUsage(AttributeTargets.Class)] public sealed class ViewStateModeByIdAttribute : Attribute { static Hashtable _viewStateIdTypes = Hashtable.Synchronized(new Hashtable()); public ViewStateModeByIdAttribute() { } internal static bool IsEnabled(Type type) { if (!_viewStateIdTypes.ContainsKey(type)) { System.ComponentModel.AttributeCollection attrs = TypeDescriptor.GetAttributes(type); ViewStateModeByIdAttribute attr = (ViewStateModeByIdAttribute)attrs[typeof(ViewStateModeByIdAttribute)]; _viewStateIdTypes[type] = (attr != null); } return (bool)_viewStateIdTypes[type]; } } } // 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
- FixedTextSelectionProcessor.cs
- FixedPage.cs
- WebEvents.cs
- OutputScopeManager.cs
- oledbmetadatacolumnnames.cs
- HostingPreferredMapPath.cs
- OutOfMemoryException.cs
- LinqToSqlWrapper.cs
- Dispatcher.cs
- ProviderMetadata.cs
- DiscoveryServiceExtension.cs
- RuntimeEnvironment.cs
- CompilerWrapper.cs
- Size3D.cs
- CodeMemberProperty.cs
- WindowsGraphics2.cs
- PnrpPermission.cs
- ParseNumbers.cs
- ReflectEventDescriptor.cs
- DbParameterCollectionHelper.cs
- TransactionManagerProxy.cs
- PeerCollaborationPermission.cs
- DeadCharTextComposition.cs
- SqlError.cs
- WizardPanelChangingEventArgs.cs
- SiteMapPath.cs
- WorkflowInstanceUnhandledExceptionRecord.cs
- ControlPropertyNameConverter.cs
- TdsParameterSetter.cs
- ProofTokenCryptoHandle.cs
- _UriTypeConverter.cs
- DocumentSchemaValidator.cs
- GroupQuery.cs
- WebPartEventArgs.cs
- WebPartManager.cs
- ListItemConverter.cs
- IntPtr.cs
- ParameterToken.cs
- Baml6Assembly.cs
- FieldNameLookup.cs
- NamespaceCollection.cs
- FtpWebResponse.cs
- PasswordTextNavigator.cs
- RefreshEventArgs.cs
- UIElementCollection.cs
- DataRecordInfo.cs
- SystemIPInterfaceProperties.cs
- ApplicationSecurityManager.cs
- BinaryExpression.cs
- TransactionChannelFactory.cs
- OutputCacheSection.cs
- XmlNamespaceMapping.cs
- ProviderUtil.cs
- GradientStopCollection.cs
- TdsParserHelperClasses.cs
- Quaternion.cs
- DataGridViewRowStateChangedEventArgs.cs
- AvtEvent.cs
- SimpleHandlerFactory.cs
- ProgressBarBrushConverter.cs
- ParameterToken.cs
- PrintController.cs
- PropertyTab.cs
- CopyEncoder.cs
- FormViewActionList.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ShaderEffect.cs
- SchemaImporter.cs
- PolicyReader.cs
- TraceUtils.cs
- OperationContextScope.cs
- SchemaMapping.cs
- ImageAutomationPeer.cs
- XhtmlConformanceSection.cs
- ToolboxComponentsCreatedEventArgs.cs
- HandlerMappingMemo.cs
- DataGridViewCellStyleChangedEventArgs.cs
- ThreadStartException.cs
- LoggedException.cs
- VSDExceptions.cs
- TableCellAutomationPeer.cs
- QueryConverter.cs
- AdornerPresentationContext.cs
- UTF32Encoding.cs
- AsymmetricKeyExchangeFormatter.cs
- XmlElement.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- AsyncContentLoadedEventArgs.cs
- ServerValidateEventArgs.cs
- DataGridCommandEventArgs.cs
- Closure.cs
- ConnectionStringSettingsCollection.cs
- RelatedCurrencyManager.cs
- SimpleMailWebEventProvider.cs
- LifetimeServices.cs
- basemetadatamappingvisitor.cs
- EpmCustomContentWriterNodeData.cs
- AccessDataSourceView.cs
- DataControlLinkButton.cs
- URL.cs