Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / LabelLiteral.cs / 1305376 / LabelLiteral.cs
using System;
using System.Collections.Generic;
using System.Text;
namespace System.Web.UI.WebControls {
// Used in the login controls for accessibility
internal sealed class LabelLiteral : Literal {
internal Control _for;
internal bool _renderAsLabel = false;
internal LabelLiteral(Control forControl) {
_for = forControl;
}
internal bool RenderAsLabel {
get {
return _renderAsLabel;
}
set {
_renderAsLabel = value;
}
}
protected internal override void Render(HtmlTextWriter writer) {
// Render as a label in designer for accessibility
if (RenderAsLabel) {
// Total hack for accessibility of labels for login controls!
writer.Write("");
writer.Write(Text);
writer.Write(" ");
}
else {
writer.AddAttribute(HtmlTextWriterAttribute.For, _for.ClientID);
writer.RenderBeginTag(HtmlTextWriterTag.Label);
base.Render(writer);
writer.RenderEndTag();
}
}
}
}
// 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
- NullableDoubleMinMaxAggregationOperator.cs
- CodeCatchClause.cs
- CodeParameterDeclarationExpressionCollection.cs
- TextAutomationPeer.cs
- MethodToken.cs
- DurableMessageDispatchInspector.cs
- SymDocumentType.cs
- WinHttpWebProxyFinder.cs
- Config.cs
- Stroke.cs
- ObjectAssociationEndMapping.cs
- UpDownBase.cs
- StsCommunicationException.cs
- TabPage.cs
- TransformerConfigurationWizardBase.cs
- XmlSchemaCollection.cs
- StoreAnnotationsMap.cs
- PolicyLevel.cs
- DefaultSection.cs
- UncommonField.cs
- WorkerRequest.cs
- SplitContainer.cs
- RangeExpression.cs
- TemplateEditingService.cs
- cryptoapiTransform.cs
- MSAANativeProvider.cs
- XLinq.cs
- Attributes.cs
- Literal.cs
- DBConnectionString.cs
- SafeArrayRankMismatchException.cs
- AssemblyAttributes.cs
- EdgeProfileValidation.cs
- ListBox.cs
- AlternationConverter.cs
- ResourcePermissionBaseEntry.cs
- DataGridViewSelectedCellCollection.cs
- PaintEvent.cs
- TriState.cs
- SqlMethodTransformer.cs
- XmlQualifiedNameTest.cs
- TokenizerHelper.cs
- BamlLocalizabilityResolver.cs
- Hyperlink.cs
- QueryOptionExpression.cs
- FormViewCommandEventArgs.cs
- ProfileGroupSettingsCollection.cs
- ArrayConverter.cs
- IDataContractSurrogate.cs
- CodeAttributeDeclarationCollection.cs
- QueryOperator.cs
- ReceiveSecurityHeader.cs
- StandardToolWindows.cs
- GenericUriParser.cs
- ScrollChrome.cs
- CapabilitiesState.cs
- ConfigurationManagerInternal.cs
- Subtree.cs
- MultipleViewProviderWrapper.cs
- WindowPatternIdentifiers.cs
- SoapIncludeAttribute.cs
- SAPICategories.cs
- SqlInternalConnectionTds.cs
- BadImageFormatException.cs
- ChtmlTextBoxAdapter.cs
- ExtensionWindowHeader.cs
- RichTextBox.cs
- ContainerActivationHelper.cs
- MembershipPasswordException.cs
- ConfigurationManagerInternalFactory.cs
- AsyncCompletedEventArgs.cs
- EdmProviderManifest.cs
- DoubleCollectionConverter.cs
- GeneralTransformGroup.cs
- ColumnWidthChangedEvent.cs
- Dictionary.cs
- Command.cs
- ImmutableObjectAttribute.cs
- SchemaImporter.cs
- Size.cs
- NamedElement.cs
- DataErrorValidationRule.cs
- WorkflowPersistenceService.cs
- QilTypeChecker.cs
- RuleElement.cs
- ScopeCompiler.cs
- FontCacheUtil.cs
- AssemblyName.cs
- BuildProviderCollection.cs
- TextSpan.cs
- RuntimeConfigLKG.cs
- ProtectedConfigurationSection.cs
- BuilderPropertyEntry.cs
- WebAdminConfigurationHelper.cs
- DeviceContext.cs
- DebugView.cs
- DesignerActionVerbItem.cs
- QilScopedVisitor.cs
- DrawingVisual.cs
- PEFileEvidenceFactory.cs