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
- ImageClickEventArgs.cs
- OleDbPropertySetGuid.cs
- CommandID.cs
- SqlMultiplexer.cs
- StatusInfoItem.cs
- contentDescriptor.cs
- BoundsDrawingContextWalker.cs
- DataGridViewSelectedCellCollection.cs
- AttributeData.cs
- AnimationClock.cs
- WebPartTracker.cs
- SessionStateModule.cs
- FontConverter.cs
- DesignerSelectionListAdapter.cs
- QilUnary.cs
- ObjectCacheHost.cs
- EventMappingSettings.cs
- ImpersonationContext.cs
- XomlCompilerHelpers.cs
- ICspAsymmetricAlgorithm.cs
- ConfigXmlText.cs
- VBIdentifierNameEditor.cs
- TemplateAction.cs
- Triplet.cs
- InfoCardTraceRecord.cs
- OLEDB_Enum.cs
- FixedSOMImage.cs
- GridItem.cs
- Rect3D.cs
- BindingCollection.cs
- SqlDataSourceQueryConverter.cs
- Command.cs
- GridViewDeleteEventArgs.cs
- SqlCacheDependencyDatabaseCollection.cs
- contentDescriptor.cs
- XhtmlBasicListAdapter.cs
- TemplatedAdorner.cs
- BuildTopDownAttribute.cs
- TimelineCollection.cs
- DependencyStoreSurrogate.cs
- GorillaCodec.cs
- TaiwanCalendar.cs
- IxmlLineInfo.cs
- RequestTimeoutManager.cs
- XpsFontSerializationService.cs
- DBConcurrencyException.cs
- WindowsGrip.cs
- SortQuery.cs
- util.cs
- ElementAction.cs
- OdbcFactory.cs
- SQLInt64Storage.cs
- DataViewListener.cs
- MemberDomainMap.cs
- HealthMonitoringSectionHelper.cs
- DBConnection.cs
- BaseAsyncResult.cs
- ObjectKeyFrameCollection.cs
- HashMembershipCondition.cs
- SmtpNegotiateAuthenticationModule.cs
- SoapElementAttribute.cs
- BitmapEffectDrawing.cs
- FormClosedEvent.cs
- DataGridViewCellValidatingEventArgs.cs
- TemplateBuilder.cs
- DataBinding.cs
- MD5CryptoServiceProvider.cs
- TableRowsCollectionEditor.cs
- AnonymousIdentificationModule.cs
- SrgsElementList.cs
- ScaleTransform.cs
- ProfileParameter.cs
- DataSourceExpression.cs
- DataBinder.cs
- PerformanceCounterPermissionEntry.cs
- DataFormats.cs
- OpacityConverter.cs
- LeftCellWrapper.cs
- CustomDictionarySources.cs
- ADMembershipUser.cs
- HtmlAnchor.cs
- HashMembershipCondition.cs
- PublisherMembershipCondition.cs
- Journal.cs
- CopyAction.cs
- HttpHandler.cs
- DiscardableAttribute.cs
- X500Name.cs
- ExpressionBindings.cs
- Brush.cs
- StrokeCollection2.cs
- PrincipalPermission.cs
- SqlEnums.cs
- SystemThemeKey.cs
- ping.cs
- BamlResourceSerializer.cs
- NetworkInformationException.cs
- Material.cs
- ConfigurationSettings.cs
- RegistryKey.cs