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
- ExceptionTranslationTable.cs
- DataAdapter.cs
- ObfuscationAttribute.cs
- StickyNoteHelper.cs
- XsltSettings.cs
- XPathMultyIterator.cs
- AccessKeyManager.cs
- TableLayout.cs
- BrowserInteropHelper.cs
- CollectionContainer.cs
- FlagsAttribute.cs
- HtmlButton.cs
- AuthenticationModulesSection.cs
- SafeArrayRankMismatchException.cs
- ButtonFieldBase.cs
- Section.cs
- XmlStreamNodeWriter.cs
- ADRole.cs
- AssociatedControlConverter.cs
- MappingMetadataHelper.cs
- DefaultIfEmptyQueryOperator.cs
- DescendantBaseQuery.cs
- MdImport.cs
- WebResponse.cs
- MaterialGroup.cs
- XmlAnyElementAttribute.cs
- IgnoreFlushAndCloseStream.cs
- TextProperties.cs
- SafeMILHandleMemoryPressure.cs
- AppDomainUnloadedException.cs
- XmlSerializationWriter.cs
- WizardPanel.cs
- CacheChildrenQuery.cs
- UnaryQueryOperator.cs
- DataGridRelationshipRow.cs
- FileAuthorizationModule.cs
- WindowHideOrCloseTracker.cs
- DefaultTypeArgumentAttribute.cs
- VBCodeProvider.cs
- WebPartDisplayModeEventArgs.cs
- TailCallAnalyzer.cs
- DynamicValueConverter.cs
- MimeXmlReflector.cs
- FixUp.cs
- StringUtil.cs
- AuthenticationModuleElement.cs
- SystemNetworkInterface.cs
- MethodAccessException.cs
- UriWriter.cs
- TransactionalPackage.cs
- TcpDuplicateContext.cs
- Crc32.cs
- ProfilePropertyNameValidator.cs
- DbgCompiler.cs
- Command.cs
- CustomAttributeBuilder.cs
- PipeConnection.cs
- Int32RectConverter.cs
- TextEditorCopyPaste.cs
- wmiprovider.cs
- ThreadExceptionDialog.cs
- SafeUserTokenHandle.cs
- EventBuilder.cs
- StringUtil.cs
- ToolStripPanelSelectionGlyph.cs
- AspNetHostingPermission.cs
- RtfControlWordInfo.cs
- DataViewListener.cs
- DataControlExtensions.cs
- FileDialog_Vista_Interop.cs
- BitmapMetadataBlob.cs
- _ListenerRequestStream.cs
- StylusButtonCollection.cs
- FilteredDataSetHelper.cs
- XslTransform.cs
- COM2ColorConverter.cs
- CommonEndpointBehaviorElement.cs
- BasicViewGenerator.cs
- EntityContainerEntitySetDefiningQuery.cs
- TcpServerChannel.cs
- AppDomain.cs
- ContainsRowNumberChecker.cs
- AggregatePushdown.cs
- XmlReflectionMember.cs
- DataContractSerializerSection.cs
- OSFeature.cs
- SmtpAuthenticationManager.cs
- AnonymousIdentificationModule.cs
- ToolTipAutomationPeer.cs
- LiteralTextParser.cs
- RC2.cs
- __ConsoleStream.cs
- WebSysDescriptionAttribute.cs
- GenericAuthenticationEventArgs.cs
- XmlSerializerOperationFormatter.cs
- _LocalDataStoreMgr.cs
- AccessibleObject.cs
- StandardTransformFactory.cs
- TypeUtils.cs
- WrapPanel.cs