Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- DbLambda.cs
- TextServicesCompartment.cs
- ConfigurationSettings.cs
- ResourcesBuildProvider.cs
- ObjectStateManagerMetadata.cs
- DirectoryNotFoundException.cs
- PermissionSetTriple.cs
- WindowsGrip.cs
- _ListenerAsyncResult.cs
- DebuggerAttributes.cs
- URLIdentityPermission.cs
- InputReport.cs
- EntryPointNotFoundException.cs
- NetworkCredential.cs
- TransactionProxy.cs
- ServicePoint.cs
- MenuEventArgs.cs
- BrowserCapabilitiesFactoryBase.cs
- WeakReadOnlyCollection.cs
- SizeChangedEventArgs.cs
- DomNameTable.cs
- EditingScope.cs
- PersonalizationProviderHelper.cs
- InputLanguageManager.cs
- TrailingSpaceComparer.cs
- CollectionBuilder.cs
- MergeLocalizationDirectives.cs
- ElementHost.cs
- ConfigXmlElement.cs
- GenericWebPart.cs
- EmbeddedMailObjectsCollection.cs
- ObjectQueryExecutionPlan.cs
- BrowsableAttribute.cs
- WebPartActionVerb.cs
- BindingNavigator.cs
- ContextMenuService.cs
- SystemUnicastIPAddressInformation.cs
- DataSourceCache.cs
- BrowserCapabilitiesCodeGenerator.cs
- RequestNavigateEventArgs.cs
- CompositeKey.cs
- ImageAnimator.cs
- SettingsBindableAttribute.cs
- Partitioner.cs
- ExtendLockCommand.cs
- BitmapDownload.cs
- SqlUtils.cs
- PathHelper.cs
- ValidationEventArgs.cs
- ListControlConvertEventArgs.cs
- ThreadExceptionDialog.cs
- DataSourceGroupCollection.cs
- BinaryCommonClasses.cs
- SafeEventLogWriteHandle.cs
- HttpCachePolicyElement.cs
- ApplicationId.cs
- DrawingGroupDrawingContext.cs
- ObjectCloneHelper.cs
- ThreadAttributes.cs
- BitmapInitialize.cs
- DataError.cs
- ContextToken.cs
- RegexMatch.cs
- ResumeStoryboard.cs
- DesignerDataStoredProcedure.cs
- counter.cs
- PrintDialog.cs
- DesignerGeometryHelper.cs
- XmlSecureResolver.cs
- PropertyPushdownHelper.cs
- TraceContextRecord.cs
- SoundPlayer.cs
- DrawingBrush.cs
- WebBrowsableAttribute.cs
- ValidationVisibilityAttribute.cs
- AnimationTimeline.cs
- AttributeCollection.cs
- ThreadPool.cs
- ArrayWithOffset.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- FormCollection.cs
- TypeCodeDomSerializer.cs
- ProtocolsConfigurationHandler.cs
- FormattedTextSymbols.cs
- HttpCapabilitiesBase.cs
- Typography.cs
- UnitySerializationHolder.cs
- Part.cs
- CommandSet.cs
- Font.cs
- MsmqInputSessionChannel.cs
- UserControl.cs
- ViewBox.cs
- EdmProviderManifest.cs
- StrongNameUtility.cs
- CategoryValueConverter.cs
- DataContext.cs
- ClientBuildManager.cs
- ScalarRestriction.cs
- GridViewUpdatedEventArgs.cs