Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebControls / Adapters / HideDisabledControlAdapter.cs / 1 / HideDisabledControlAdapter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.Adapters { using System; using System.Security.Permissions; using System.Web; using System.Web.UI; using System.Web.UI.Adapters; // Used for controls which use their default rendering, but are hidden when disabled. [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class HideDisabledControlAdapter : WebControlAdapter { // Returns without doing anything if the control is disabled, otherwise, uses the default rendering. protected internal override void Render(HtmlTextWriter writer) { if (Control.Enabled == false) { return; } Control.Render(writer); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.Adapters { using System; using System.Security.Permissions; using System.Web; using System.Web.UI; using System.Web.UI.Adapters; // Used for controls which use their default rendering, but are hidden when disabled. [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class HideDisabledControlAdapter : WebControlAdapter { // Returns without doing anything if the control is disabled, otherwise, uses the default rendering. protected internal override void Render(HtmlTextWriter writer) { if (Control.Enabled == false) { return; } Control.Render(writer); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ArrayConverter.cs
- SafeEventHandle.cs
- MultilineStringEditor.cs
- TypeName.cs
- DataPointer.cs
- DataReaderContainer.cs
- RegionInfo.cs
- FrugalList.cs
- SqlDataSourceCommandEventArgs.cs
- UnsignedPublishLicense.cs
- ModifierKeysConverter.cs
- SqlTypeConverter.cs
- DetailsViewDeletedEventArgs.cs
- GroupDescription.cs
- NewItemsContextMenuStrip.cs
- BuildManager.cs
- RowUpdatingEventArgs.cs
- TrustManagerPromptUI.cs
- Zone.cs
- DebuggerAttributes.cs
- ColorContextHelper.cs
- NamedObject.cs
- DeferredElementTreeState.cs
- ThreadPool.cs
- TokenBasedSetEnumerator.cs
- ColumnReorderedEventArgs.cs
- DataGridViewBindingCompleteEventArgs.cs
- AssemblyHash.cs
- DynamicRendererThreadManager.cs
- DataError.cs
- ColorAnimation.cs
- IBuiltInEvidence.cs
- InvalidCommandTreeException.cs
- Point3D.cs
- InvalidAsynchronousStateException.cs
- FontEmbeddingManager.cs
- RtfToXamlLexer.cs
- SystemIcons.cs
- MetadataItemEmitter.cs
- SupportsEventValidationAttribute.cs
- CaseCqlBlock.cs
- CombinedHttpChannel.cs
- LinqDataSourceInsertEventArgs.cs
- TreeNodeClickEventArgs.cs
- XsltContext.cs
- XmlCDATASection.cs
- ContactManager.cs
- Win32Native.cs
- DoubleCollectionValueSerializer.cs
- StringArrayConverter.cs
- StaticExtension.cs
- SystemUnicastIPAddressInformation.cs
- TagPrefixInfo.cs
- ViewManagerAttribute.cs
- FileChangesMonitor.cs
- DateTimeSerializationSection.cs
- SubMenuStyleCollection.cs
- DataObjectPastingEventArgs.cs
- HttpListenerPrefixCollection.cs
- ConfigXmlSignificantWhitespace.cs
- XmlSchemaObject.cs
- SQLString.cs
- InputReportEventArgs.cs
- CommonRemoteMemoryBlock.cs
- DateTimePicker.cs
- XmlDeclaration.cs
- StylusEventArgs.cs
- CollectionTypeElement.cs
- DataListCommandEventArgs.cs
- EncoderNLS.cs
- AssociationType.cs
- DataServiceQueryProvider.cs
- EnumValidator.cs
- CompiledRegexRunner.cs
- FontStretches.cs
- XamlPointCollectionSerializer.cs
- RtfControls.cs
- SystemPens.cs
- srgsitem.cs
- RelationalExpressions.cs
- FixedDocumentPaginator.cs
- Line.cs
- CodeSnippetCompileUnit.cs
- InstallHelper.cs
- RightsManagementPermission.cs
- DBCommand.cs
- WorkflowItemPresenter.cs
- TypeGenericEnumerableViewSchema.cs
- DynamicPropertyHolder.cs
- StringStorage.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- Message.cs
- CacheModeValueSerializer.cs
- HwndHostAutomationPeer.cs
- AuditLevel.cs
- InfoCardKeyedHashAlgorithm.cs
- MultipleViewProviderWrapper.cs
- StringConcat.cs
- MultipartIdentifier.cs
- VisualStyleRenderer.cs