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
- IntSecurity.cs
- LayoutEvent.cs
- SelectionUIHandler.cs
- HMACMD5.cs
- UIElement3D.cs
- TransformedBitmap.cs
- XmlDataCollection.cs
- Deflater.cs
- NonBatchDirectoryCompiler.cs
- IndentedTextWriter.cs
- HMACSHA512.cs
- TemplateBindingExtension.cs
- DataContractSerializer.cs
- SelectedDatesCollection.cs
- StrictAndMessageFilter.cs
- ContainerSelectorGlyph.cs
- WebPartEditorApplyVerb.cs
- DataGridViewCellValueEventArgs.cs
- TreeViewItemAutomationPeer.cs
- ConfigXmlSignificantWhitespace.cs
- TransformationRules.cs
- Vector3DValueSerializer.cs
- TextStore.cs
- UnsafeNativeMethods.cs
- MessageSecurityOverMsmqElement.cs
- BackStopAuthenticationModule.cs
- TabControlEvent.cs
- Transactions.cs
- QueryTask.cs
- ListControlBoundActionList.cs
- Repeater.cs
- EncryptedType.cs
- RowSpanVector.cs
- MouseDevice.cs
- Stackframe.cs
- ExceptionHelpers.cs
- WebPartZone.cs
- PathBox.cs
- BitmapEffectDrawingContent.cs
- Color.cs
- X509CertificateChain.cs
- CapiNative.cs
- _Events.cs
- _DigestClient.cs
- ParentQuery.cs
- FactoryMaker.cs
- HtmlInputCheckBox.cs
- OrderedDictionaryStateHelper.cs
- Models.cs
- DocumentOrderQuery.cs
- PackagePart.cs
- HttpConfigurationSystem.cs
- ResourceDefaultValueAttribute.cs
- CheckBoxPopupAdapter.cs
- FlowPosition.cs
- CodeGenerator.cs
- WebBrowserProgressChangedEventHandler.cs
- UrlPropertyAttribute.cs
- ColumnResizeAdorner.cs
- HttpProfileGroupBase.cs
- ContentElementAutomationPeer.cs
- FixedDocumentSequencePaginator.cs
- ProcessInfo.cs
- CodeThrowExceptionStatement.cs
- RemotingServices.cs
- DiscoveryClientReferences.cs
- DebuggerAttributes.cs
- log.cs
- HMACSHA384.cs
- PlainXmlWriter.cs
- _CommandStream.cs
- StrokeNodeOperations.cs
- NetCodeGroup.cs
- SafeMemoryMappedViewHandle.cs
- LingerOption.cs
- ResourceDictionary.cs
- Region.cs
- FixedTextBuilder.cs
- ProviderUtil.cs
- UIElementParaClient.cs
- PlainXmlSerializer.cs
- ExpressionBuilder.cs
- DeliveryRequirementsAttribute.cs
- MonthChangedEventArgs.cs
- AggregateNode.cs
- MultiDataTrigger.cs
- PropertiesTab.cs
- XMLUtil.cs
- Matrix.cs
- ProfileInfo.cs
- DesignerObjectListAdapter.cs
- XmlAttribute.cs
- Renderer.cs
- WindowsToolbarItemAsMenuItem.cs
- FrameworkTextComposition.cs
- EntityContainerEmitter.cs
- AspCompat.cs
- TransformCollection.cs
- EpmCustomContentWriterNodeData.cs
- LinqDataSourceDisposeEventArgs.cs