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
- ECDiffieHellmanPublicKey.cs
- CodeDirectoryCompiler.cs
- ScriptResourceAttribute.cs
- DriveInfo.cs
- TriState.cs
- RolePrincipal.cs
- NameSpaceEvent.cs
- HttpHandlerActionCollection.cs
- Bezier.cs
- _UncName.cs
- MetadataHelper.cs
- BinaryFormatterWriter.cs
- SchemaExporter.cs
- ObjectItemLoadingSessionData.cs
- CommandValueSerializer.cs
- DecodeHelper.cs
- IISMapPath.cs
- RegistryPermission.cs
- DbgCompiler.cs
- SQlBooleanStorage.cs
- Underline.cs
- BaseDataBoundControl.cs
- VirtualPath.cs
- BamlStream.cs
- TextHintingModeValidation.cs
- AutoResizedEvent.cs
- DataControlCommands.cs
- SizeAnimationUsingKeyFrames.cs
- DocumentationServerProtocol.cs
- Expr.cs
- VerifyHashRequest.cs
- SystemBrushes.cs
- ConstraintStruct.cs
- AsyncCodeActivity.cs
- ImageInfo.cs
- ListViewPagedDataSource.cs
- cryptoapiTransform.cs
- formatter.cs
- Queue.cs
- SafeBitVector32.cs
- PolyQuadraticBezierSegment.cs
- WebPartPersonalization.cs
- GlobalProxySelection.cs
- DbModificationCommandTree.cs
- XamlSerializationHelper.cs
- PersonalizationStateQuery.cs
- SignatureHelper.cs
- CodeAttachEventStatement.cs
- InstanceDataCollectionCollection.cs
- XslVisitor.cs
- ProjectedWrapper.cs
- SqlWebEventProvider.cs
- WebPartTransformerAttribute.cs
- WindowsListViewGroup.cs
- File.cs
- CompositeScriptReferenceEventArgs.cs
- ForceCopyBuildProvider.cs
- GeometryDrawing.cs
- MarkupCompilePass2.cs
- StateChangeEvent.cs
- CursorConverter.cs
- IODescriptionAttribute.cs
- BinarySecretSecurityToken.cs
- MediaSystem.cs
- AxDesigner.cs
- ReadOnlyTernaryTree.cs
- ResourceDescriptionAttribute.cs
- Parameter.cs
- StandardOleMarshalObject.cs
- FlowDocument.cs
- DbConnectionPoolIdentity.cs
- CheckedListBox.cs
- QuotedPrintableStream.cs
- TextTrailingWordEllipsis.cs
- Win32Exception.cs
- BamlRecordReader.cs
- MenuItemBindingCollection.cs
- FastEncoderWindow.cs
- SapiRecognizer.cs
- SamlSubjectStatement.cs
- StreamAsIStream.cs
- PasswordBoxAutomationPeer.cs
- MonthChangedEventArgs.cs
- PropertyToken.cs
- TracePayload.cs
- FrameworkTextComposition.cs
- EventWaitHandleSecurity.cs
- DateTimeFormatInfo.cs
- ObjectConverter.cs
- ConsoleCancelEventArgs.cs
- Pen.cs
- DeviceContext2.cs
- SetIndexBinder.cs
- DataSourceHelper.cs
- LicenseException.cs
- Endpoint.cs
- DataGridViewTopLeftHeaderCell.cs
- InternalBase.cs
- SqlFileStream.cs
- QuaternionRotation3D.cs