Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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. // //----------------------------------------------------------------------------- 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DefaultTextStore.cs
- WebRequestModulesSection.cs
- WorkflowRuntimeServiceElement.cs
- MediaPlayerState.cs
- Style.cs
- EditCommandColumn.cs
- HeaderElement.cs
- NamedElement.cs
- SchemaSetCompiler.cs
- RsaEndpointIdentity.cs
- ContextToken.cs
- WebBrowserDocumentCompletedEventHandler.cs
- ExpressionBuilderContext.cs
- SiteIdentityPermission.cs
- ExclusiveNamedPipeTransportManager.cs
- DesignerVerbCollection.cs
- InvariantComparer.cs
- ListViewTableCell.cs
- safemediahandle.cs
- NotSupportedException.cs
- SynchronizedDispatch.cs
- SqlDataSourceFilteringEventArgs.cs
- FixedTextContainer.cs
- TextEditorTables.cs
- StatusBarPanelClickEvent.cs
- MultiSelector.cs
- Profiler.cs
- XmlSchemaSimpleType.cs
- ModelFunction.cs
- _CacheStreams.cs
- XsltArgumentList.cs
- StrokeSerializer.cs
- CultureInfoConverter.cs
- AssemblyInfo.cs
- SerializationStore.cs
- XsdDateTime.cs
- EmptyQuery.cs
- DrawingAttributes.cs
- CodeBlockBuilder.cs
- SqlFunctionAttribute.cs
- BaseDataBoundControl.cs
- TableLayoutSettings.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- __ConsoleStream.cs
- EntitySqlQueryBuilder.cs
- StorageEntityContainerMapping.cs
- RSAPKCS1KeyExchangeFormatter.cs
- serverconfig.cs
- FontFamily.cs
- Transactions.cs
- ViewLoader.cs
- ProxyAttribute.cs
- XmlReaderSettings.cs
- UInt16Converter.cs
- TransformPattern.cs
- InvokeProviderWrapper.cs
- RepeatButtonAutomationPeer.cs
- TextEditorThreadLocalStore.cs
- SchemaElement.cs
- SourceFileBuildProvider.cs
- DBCommandBuilder.cs
- BindingMAnagerBase.cs
- DocumentViewer.cs
- TemplateXamlParser.cs
- AsyncPostBackErrorEventArgs.cs
- HtmlDocument.cs
- Stylesheet.cs
- DrawingServices.cs
- WebDescriptionAttribute.cs
- OdbcPermission.cs
- IDQuery.cs
- UntypedNullExpression.cs
- Keyboard.cs
- PathGradientBrush.cs
- ParallelTimeline.cs
- XmlNodeChangedEventArgs.cs
- ImageAnimator.cs
- ScrollableControl.cs
- ObjectStateEntry.cs
- HttpBrowserCapabilitiesBase.cs
- StringDictionaryEditor.cs
- DispatcherExceptionFilterEventArgs.cs
- Method.cs
- IdleTimeoutMonitor.cs
- CallbackDebugElement.cs
- FormsAuthenticationUser.cs
- WmfPlaceableFileHeader.cs
- DictationGrammar.cs
- HtmlShim.cs
- X509CertificateCollection.cs
- ContextStaticAttribute.cs
- Parser.cs
- SizeAnimationBase.cs
- sortedlist.cs
- SamlAuthorityBinding.cs
- LinkLabelLinkClickedEvent.cs
- TerminateWorkflow.cs
- TrailingSpaceComparer.cs
- AdCreatedEventArgs.cs
- HandleCollector.cs