Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebControls / Adapters / WebControlAdapter.cs / 1 / WebControlAdapter.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;
// Provides adaptive rendering for a web control.
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public class WebControlAdapter : ControlAdapter {
// Returns a strongly typed control instance.
protected new WebControl Control {
get {
return (WebControl)base.Control;
}
}
/// Indicates whether the associated WebControl is enabled
/// taking into account the cascading effect of the enabled property.
protected bool IsEnabled {
get {
return Control.IsEnabled;
}
}
protected virtual void RenderBeginTag(HtmlTextWriter writer) {
Control.RenderBeginTag(writer);
}
protected virtual void RenderEndTag(HtmlTextWriter writer) {
Control.RenderEndTag(writer);
}
protected virtual void RenderContents(HtmlTextWriter writer) {
Control.RenderContents(writer);
}
protected internal override void Render(HtmlTextWriter writer) {
RenderBeginTag(writer);
RenderContents(writer);
RenderEndTag(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;
// Provides adaptive rendering for a web control.
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public class WebControlAdapter : ControlAdapter {
// Returns a strongly typed control instance.
protected new WebControl Control {
get {
return (WebControl)base.Control;
}
}
/// Indicates whether the associated WebControl is enabled
/// taking into account the cascading effect of the enabled property.
protected bool IsEnabled {
get {
return Control.IsEnabled;
}
}
protected virtual void RenderBeginTag(HtmlTextWriter writer) {
Control.RenderBeginTag(writer);
}
protected virtual void RenderEndTag(HtmlTextWriter writer) {
Control.RenderEndTag(writer);
}
protected virtual void RenderContents(HtmlTextWriter writer) {
Control.RenderContents(writer);
}
protected internal override void Render(HtmlTextWriter writer) {
RenderBeginTag(writer);
RenderContents(writer);
RenderEndTag(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
- BaseProcessor.cs
- DataRelation.cs
- wmiprovider.cs
- UidPropertyAttribute.cs
- ArrayHelper.cs
- HttpWebResponse.cs
- DefaultSection.cs
- RankException.cs
- panel.cs
- SimpleWorkerRequest.cs
- UpdateProgress.cs
- InputElement.cs
- FileClassifier.cs
- NativeMethodsCLR.cs
- SqlDataSourceEnumerator.cs
- Site.cs
- BitmapImage.cs
- Clause.cs
- PeerCredential.cs
- ColumnCollection.cs
- Adorner.cs
- ToolStripDropDownItem.cs
- RegexCapture.cs
- Panel.cs
- PageHandlerFactory.cs
- RequiredAttributeAttribute.cs
- CodeTypeReference.cs
- XPathAxisIterator.cs
- LineInfo.cs
- TaskExceptionHolder.cs
- XsltSettings.cs
- WebContext.cs
- InputReferenceExpression.cs
- BinaryObjectWriter.cs
- ToolboxItemSnapLineBehavior.cs
- ModuleElement.cs
- ipaddressinformationcollection.cs
- MaterializeFromAtom.cs
- ElementNotEnabledException.cs
- SharedPerformanceCounter.cs
- SafeMemoryMappedViewHandle.cs
- UInt64Storage.cs
- DBDataPermissionAttribute.cs
- SettingsProperty.cs
- GradientSpreadMethodValidation.cs
- NavigationPropertyAccessor.cs
- _Connection.cs
- XmlSchemaAppInfo.cs
- NamespaceDecl.cs
- XmlAttributeOverrides.cs
- XsdCachingReader.cs
- CodeNamespaceCollection.cs
- BStrWrapper.cs
- SafeFindHandle.cs
- RegexInterpreter.cs
- EventLogLink.cs
- PropertyEmitterBase.cs
- AdRotator.cs
- TextElementEnumerator.cs
- TransformGroup.cs
- TextCompositionManager.cs
- ListViewInsertionMark.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- DesignerUtility.cs
- StdValidatorsAndConverters.cs
- ADMembershipProvider.cs
- ServiceObjectContainer.cs
- UpdateProgress.cs
- HttpModuleActionCollection.cs
- DataServiceQueryOfT.cs
- SessionParameter.cs
- FixedPageStructure.cs
- GridEntryCollection.cs
- TextViewSelectionProcessor.cs
- FindCompletedEventArgs.cs
- CompilationSection.cs
- Literal.cs
- DataControlReference.cs
- AQNBuilder.cs
- TCEAdapterGenerator.cs
- TagPrefixCollection.cs
- CatalogPart.cs
- ScriptResourceDefinition.cs
- SymDocumentType.cs
- QuaternionRotation3D.cs
- VisualBasicValue.cs
- Select.cs
- SettingsProviderCollection.cs
- DbConnectionStringCommon.cs
- FacetValues.cs
- DataGridViewComboBoxColumn.cs
- InternalConfigHost.cs
- ListenerBinder.cs
- cookie.cs
- XhtmlBasicTextBoxAdapter.cs
- TemplateEditingVerb.cs
- hresults.cs
- CellConstant.cs
- ParseElement.cs