Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / ViewStateModeByIdAttribute.cs / 1305376 / 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; [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; [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
- XmlSchemaInferenceException.cs
- RequestResponse.cs
- EditorPart.cs
- DrawItemEvent.cs
- ModelTreeManager.cs
- oledbmetadatacollectionnames.cs
- PickDesigner.xaml.cs
- XmlSchemaAnnotation.cs
- Quad.cs
- GenericRootAutomationPeer.cs
- SqlDataSourceCache.cs
- ReflectTypeDescriptionProvider.cs
- DetailsViewDeleteEventArgs.cs
- ComboBoxRenderer.cs
- backend.cs
- DefinitionBase.cs
- RefreshInfo.cs
- Axis.cs
- TypeUsage.cs
- InvalidContentTypeException.cs
- XmlSchemaSimpleContentRestriction.cs
- TreeWalkHelper.cs
- ApplicationSecurityManager.cs
- RuleAttributes.cs
- DataGridDesigner.cs
- LabelEditEvent.cs
- ThousandthOfEmRealDoubles.cs
- StringPropertyBuilder.cs
- BaseAutoFormat.cs
- Deflater.cs
- XmlTextReaderImplHelpers.cs
- SiteMapHierarchicalDataSourceView.cs
- _AutoWebProxyScriptWrapper.cs
- _ChunkParse.cs
- TreeNode.cs
- InternalConfigEventArgs.cs
- PageParser.cs
- StrongNameMembershipCondition.cs
- EpmCustomContentDeSerializer.cs
- ClientSettings.cs
- precedingquery.cs
- MouseButton.cs
- EnumValAlphaComparer.cs
- StreamWithDictionary.cs
- HttpDictionary.cs
- ExpressionBuilderCollection.cs
- OLEDB_Util.cs
- Attributes.cs
- SecurityRuntime.cs
- HwndStylusInputProvider.cs
- CultureInfo.cs
- KeyConstraint.cs
- PageContentCollection.cs
- PerformanceCounterPermissionAttribute.cs
- MethodRental.cs
- HtmlInputButton.cs
- GifBitmapDecoder.cs
- ProviderConnectionPoint.cs
- RoleServiceManager.cs
- ButtonFieldBase.cs
- SelectorAutomationPeer.cs
- PublisherIdentityPermission.cs
- DragDrop.cs
- Bitmap.cs
- Ray3DHitTestResult.cs
- ReadOnlyDataSourceView.cs
- SchemaMapping.cs
- GeneralTransform3DTo2D.cs
- VisualTreeUtils.cs
- PageContentCollection.cs
- ShaderEffect.cs
- UrlRoutingModule.cs
- HtmlTableRow.cs
- RequestCacheValidator.cs
- SymbolPair.cs
- TranslateTransform.cs
- GB18030Encoding.cs
- uribuilder.cs
- ImageList.cs
- SQLInt16.cs
- DataServices.cs
- CodeGroup.cs
- HitTestWithGeometryDrawingContextWalker.cs
- MetabaseServerConfig.cs
- Wow64ConfigurationLoader.cs
- ServiceDescriptionSerializer.cs
- _BaseOverlappedAsyncResult.cs
- PerfService.cs
- MetadataStore.cs
- ExportException.cs
- RegexRunnerFactory.cs
- Separator.cs
- GlyphsSerializer.cs
- DirectionalLight.cs
- shaperfactory.cs
- UnmanagedHandle.cs
- EnlistmentTraceIdentifier.cs
- ListenDesigner.cs
- XmlDocumentSerializer.cs
- TemplateParser.cs