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
- DataGridViewCellCollection.cs
- odbcmetadatafactory.cs
- _ShellExpression.cs
- XmlNodeList.cs
- AppDomainProtocolHandler.cs
- CommonXSendMessage.cs
- FileEnumerator.cs
- ComboBoxAutomationPeer.cs
- HtmlWindow.cs
- ToolboxItemCollection.cs
- HelpEvent.cs
- RepeaterItem.cs
- DependencyObject.cs
- SerialStream.cs
- SQLBytesStorage.cs
- GACIdentityPermission.cs
- EntitySetDataBindingList.cs
- WebResponse.cs
- Win32.cs
- UInt32Storage.cs
- OdbcEnvironmentHandle.cs
- EditorZone.cs
- TypeUtil.cs
- XmlnsDictionary.cs
- VectorCollection.cs
- MimeMapping.cs
- Signature.cs
- NativeRecognizer.cs
- DataControlReferenceCollection.cs
- ObjectQuery_EntitySqlExtensions.cs
- BrowserCapabilitiesFactory.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- StrongNameIdentityPermission.cs
- EntityDescriptor.cs
- Quaternion.cs
- EndpointBehaviorElementCollection.cs
- GridItemPattern.cs
- PropertyMappingExceptionEventArgs.cs
- Operators.cs
- StrongNameUtility.cs
- JsonServiceDocumentSerializer.cs
- XmlQuerySequence.cs
- coordinatorfactory.cs
- PerspectiveCamera.cs
- UrlAuthorizationModule.cs
- GetParentChain.cs
- ObjectListDesigner.cs
- ProtocolImporter.cs
- WebEventCodes.cs
- _CommandStream.cs
- SoapElementAttribute.cs
- CmsInterop.cs
- StyleSheetRefUrlEditor.cs
- FocusWithinProperty.cs
- _DigestClient.cs
- NopReturnReader.cs
- LayoutTableCell.cs
- NotificationContext.cs
- DataGridSortCommandEventArgs.cs
- ProcessThreadCollection.cs
- RtfControls.cs
- WebPartZone.cs
- WorkflowMessageEventHandler.cs
- webproxy.cs
- OracleNumber.cs
- TextEditor.cs
- OutputCache.cs
- StrongNameIdentityPermission.cs
- MimeTypePropertyAttribute.cs
- ExecutionEngineException.cs
- XmlSchemaAppInfo.cs
- BorderSidesEditor.cs
- SignatureTargetIdManager.cs
- CustomTypeDescriptor.cs
- SystemIPv6InterfaceProperties.cs
- Error.cs
- TextTreeUndo.cs
- SubclassTypeValidatorAttribute.cs
- ConvertEvent.cs
- UrlMappingCollection.cs
- CodeMemberEvent.cs
- EventDescriptorCollection.cs
- ArrangedElementCollection.cs
- WeakHashtable.cs
- ObjectDataSourceFilteringEventArgs.cs
- BrowserTree.cs
- GuidTagList.cs
- TraceXPathNavigator.cs
- Stroke.cs
- HttpCapabilitiesSectionHandler.cs
- QueryContinueDragEventArgs.cs
- WebHeaderCollection.cs
- ThreadStartException.cs
- WebMethodAttribute.cs
- CharKeyFrameCollection.cs
- DropTarget.cs
- CqlQuery.cs
- ListItemViewAttribute.cs
- ConfigurationSectionGroupCollection.cs
- WebPartManagerInternals.cs