Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- RecipientServiceModelSecurityTokenRequirement.cs
- HostProtectionException.cs
- DbBuffer.cs
- SafeSecurityHandles.cs
- ContextStack.cs
- CFStream.cs
- PowerStatus.cs
- DirectionalLight.cs
- CodeAccessSecurityEngine.cs
- StreamFormatter.cs
- PrivacyNoticeBindingElement.cs
- AdRotator.cs
- DocumentViewerHelper.cs
- Cursor.cs
- PropertyChange.cs
- TypeBuilderInstantiation.cs
- LOSFormatter.cs
- PrimaryKeyTypeConverter.cs
- FileIOPermission.cs
- ZoomPercentageConverter.cs
- TreePrinter.cs
- XamlHttpHandlerFactory.cs
- WhiteSpaceTrimStringConverter.cs
- MsmqChannelListenerBase.cs
- XamlFilter.cs
- CompensatableTransactionScopeActivityDesigner.cs
- RawStylusActions.cs
- CallTemplateAction.cs
- TableLayoutSettings.cs
- ImportOptions.cs
- DataGridViewCellStyleBuilderDialog.cs
- DataTemplate.cs
- DetailsViewModeEventArgs.cs
- UserControlAutomationPeer.cs
- UrlPath.cs
- WindowsRichEditRange.cs
- Graphics.cs
- TypeSystemProvider.cs
- _TimerThread.cs
- XomlDesignerLoader.cs
- BufferedReadStream.cs
- IncrementalHitTester.cs
- FamilyCollection.cs
- ToolStripSystemRenderer.cs
- SelectedDatesCollection.cs
- LambdaCompiler.Lambda.cs
- ImageListUtils.cs
- DoubleAnimationUsingKeyFrames.cs
- ColorKeyFrameCollection.cs
- PropertyCondition.cs
- MethodToken.cs
- DependencyProperty.cs
- FreezableDefaultValueFactory.cs
- RepeaterItemCollection.cs
- EntityDataSourceViewSchema.cs
- SiteMapSection.cs
- TypeConverterHelper.cs
- RecipientInfo.cs
- CustomErrorsSectionWrapper.cs
- InputLanguageManager.cs
- RequestCacheEntry.cs
- WebPartCatalogAddVerb.cs
- HtmlTitle.cs
- XmlText.cs
- Models.cs
- Unit.cs
- DbgUtil.cs
- ThrowHelper.cs
- XmlStringTable.cs
- TextInfo.cs
- ReadOnlyCollectionBase.cs
- SchemaSetCompiler.cs
- FormConverter.cs
- IHttpResponseInternal.cs
- CharStorage.cs
- TemplateControl.cs
- DataControlCommands.cs
- VectorAnimationBase.cs
- DBConnection.cs
- WindowsFont.cs
- BoundColumn.cs
- OdbcConnection.cs
- NameValueConfigurationCollection.cs
- EntityParameter.cs
- JsonDeserializer.cs
- DataGridRowDetailsEventArgs.cs
- base64Transforms.cs
- UserPersonalizationStateInfo.cs
- TableLayoutColumnStyleCollection.cs
- DataGridViewCheckBoxCell.cs
- SqlConnectionStringBuilder.cs
- XamlTypeMapper.cs
- SigningDialog.cs
- RandomNumberGenerator.cs
- StrongNameKeyPair.cs
- ImageListUtils.cs
- RequestCachePolicyConverter.cs
- AttachedAnnotationChangedEventArgs.cs
- RoleGroup.cs
- ParserHooks.cs