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
- XmlSchemaComplexContent.cs
- GetWinFXPath.cs
- RemotingConfigParser.cs
- PathHelper.cs
- MatrixUtil.cs
- SafeLocalMemHandle.cs
- OleDbInfoMessageEvent.cs
- DataMisalignedException.cs
- Timeline.cs
- URLIdentityPermission.cs
- NamespaceListProperty.cs
- Random.cs
- TransformDescriptor.cs
- DataQuery.cs
- PageStatePersister.cs
- SQLConvert.cs
- IHttpResponseInternal.cs
- ImmutableObjectAttribute.cs
- CustomGrammar.cs
- EntityDescriptor.cs
- ByteAnimationUsingKeyFrames.cs
- sqlstateclientmanager.cs
- UnmanagedHandle.cs
- BitmapFrameDecode.cs
- BuildProvidersCompiler.cs
- TableFieldsEditor.cs
- GridViewAutomationPeer.cs
- HostedBindingBehavior.cs
- XamlTreeBuilder.cs
- XmlExpressionDumper.cs
- SqlRowUpdatedEvent.cs
- TypeConverterHelper.cs
- HtmlElementEventArgs.cs
- BookmarkList.cs
- Button.cs
- TableParaClient.cs
- ConnectionInterfaceCollection.cs
- CharacterString.cs
- DataTableReader.cs
- activationcontext.cs
- PersonalizationEntry.cs
- DbConnectionInternal.cs
- DesignerResources.cs
- TextBoxBase.cs
- ExtendedPropertyDescriptor.cs
- mactripleDES.cs
- WithStatement.cs
- TrackPointCollection.cs
- NegationPusher.cs
- PersonalizationStateInfo.cs
- TTSVoice.cs
- WindowsEditBox.cs
- mda.cs
- ContextStack.cs
- TablePattern.cs
- CompiledXpathExpr.cs
- ITextView.cs
- SubclassTypeValidator.cs
- SqlConnectionHelper.cs
- Rectangle.cs
- OutputCacheSettings.cs
- SessionEndedEventArgs.cs
- MetadataCache.cs
- ColorAnimationUsingKeyFrames.cs
- DataServices.cs
- HitTestFilterBehavior.cs
- _ProxyChain.cs
- AdapterDictionary.cs
- MaskedTextProvider.cs
- ConstantProjectedSlot.cs
- CodeCompiler.cs
- baseaxisquery.cs
- DataListItem.cs
- DecoratedNameAttribute.cs
- ChangeConflicts.cs
- ScanQueryOperator.cs
- SqlRowUpdatedEvent.cs
- BlobPersonalizationState.cs
- SqlClientWrapperSmiStreamChars.cs
- LifetimeServices.cs
- WebServiceResponse.cs
- AutomationTextAttribute.cs
- ExpressionBuilderCollection.cs
- DataServiceStreamProviderWrapper.cs
- AstNode.cs
- Internal.cs
- Listbox.cs
- PolicyStatement.cs
- SelectionProviderWrapper.cs
- NetMsmqBindingElement.cs
- CreateUserErrorEventArgs.cs
- DbCommandDefinition.cs
- DateTimeValueSerializerContext.cs
- XPathMultyIterator.cs
- SafeFindHandle.cs
- Timeline.cs
- AssociationSet.cs
- OutputCacheProfileCollection.cs
- SQLMembershipProvider.cs
- PagesChangedEventArgs.cs