Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / HtmlControls / HtmlTitle.cs / 1 / HtmlTitle.cs
// Copyright (c) Microsoft Corporation. All rights reserved. namespace System.Web.UI.HtmlControls { using System; using System.ComponentModel; using System.Security.Permissions; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class HtmlTitle : HtmlControl { private string _text; public HtmlTitle() : base("title") { } [ WebCategory("Appearance"), DefaultValue(""), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Localizable(true), PersistenceMode(PersistenceMode.InnerDefaultProperty) ] public virtual string Text { get { if (_text == null) { return String.Empty; } return _text; } set { _text = value; } } protected override void AddParsedSubObject(object obj) { if (obj is LiteralControl) { _text = ((LiteralControl)obj).Text; } else { base.AddParsedSubObject(obj); } } // Allow child controls to support databinding expressions as inner text. protected override ControlCollection CreateControlCollection() { return new ControlCollection(this); } protected internal override void Render(HtmlTextWriter writer) { writer.RenderBeginTag(HtmlTextWriterTag.Title); if (HasControls() || HasRenderDelegate()) { RenderChildren(writer); } else if (_text != null) { writer.Write(_text); } writer.RenderEndTag(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.Web.UI.HtmlControls { using System; using System.ComponentModel; using System.Security.Permissions; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class HtmlTitle : HtmlControl { private string _text; public HtmlTitle() : base("title") { } [ WebCategory("Appearance"), DefaultValue(""), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Localizable(true), PersistenceMode(PersistenceMode.InnerDefaultProperty) ] public virtual string Text { get { if (_text == null) { return String.Empty; } return _text; } set { _text = value; } } protected override void AddParsedSubObject(object obj) { if (obj is LiteralControl) { _text = ((LiteralControl)obj).Text; } else { base.AddParsedSubObject(obj); } } // Allow child controls to support databinding expressions as inner text. protected override ControlCollection CreateControlCollection() { return new ControlCollection(this); } protected internal override void Render(HtmlTextWriter writer) { writer.RenderBeginTag(HtmlTextWriterTag.Title); if (HasControls() || HasRenderDelegate()) { RenderChildren(writer); } else if (_text != null) { writer.Write(_text); } writer.RenderEndTag(); } } } // 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
- TableItemPatternIdentifiers.cs
- WindowsStatusBar.cs
- Events.cs
- ProxyManager.cs
- CqlParserHelpers.cs
- ViewGenerator.cs
- KeyValueInternalCollection.cs
- StringInfo.cs
- CssStyleCollection.cs
- ProfessionalColors.cs
- SpellerInterop.cs
- MetadataPropertyvalue.cs
- CookieProtection.cs
- DrawingBrush.cs
- XmlSchemaSimpleContent.cs
- AttributeUsageAttribute.cs
- DoubleConverter.cs
- TimeoutStream.cs
- EventLogConfiguration.cs
- CharacterHit.cs
- Int16Animation.cs
- PrincipalPermission.cs
- SHA256Managed.cs
- IntegerFacetDescriptionElement.cs
- BaseCodePageEncoding.cs
- HttpPostClientProtocol.cs
- PropertyTabAttribute.cs
- XPathPatternParser.cs
- ProtocolsConfigurationEntry.cs
- ResolveCriteriaCD1.cs
- HtmlWindow.cs
- URLIdentityPermission.cs
- MetadataArtifactLoader.cs
- SelectionWordBreaker.cs
- AvtEvent.cs
- ArgumentException.cs
- CryptoConfig.cs
- AccessDataSourceWizardForm.cs
- PrintDialogException.cs
- HebrewCalendar.cs
- TextElementEnumerator.cs
- Material.cs
- ExtenderHelpers.cs
- ScriptingProfileServiceSection.cs
- DataExpression.cs
- ElementNotAvailableException.cs
- MsdtcWrapper.cs
- FixedSOMTable.cs
- WindowsTokenRoleProvider.cs
- LineBreak.cs
- DataGridRow.cs
- WSTrustFeb2005.cs
- PartitionResolver.cs
- ProviderSettingsCollection.cs
- EncoderFallback.cs
- GenericFlowSwitchHelper.cs
- FileLevelControlBuilderAttribute.cs
- ProvideValueServiceProvider.cs
- HMAC.cs
- ScriptControlManager.cs
- RuntimeResourceSet.cs
- MailWebEventProvider.cs
- MutexSecurity.cs
- OleDbPermission.cs
- StatusBar.cs
- SoapReflectionImporter.cs
- ResourcePool.cs
- TextDecorationLocationValidation.cs
- ResolveCompletedEventArgs.cs
- TextRange.cs
- FormView.cs
- BrushValueSerializer.cs
- hresults.cs
- columnmapkeybuilder.cs
- SoapRpcMethodAttribute.cs
- ObjectSet.cs
- TextTreeRootNode.cs
- ContentDisposition.cs
- ReadOnlyMetadataCollection.cs
- TextBox.cs
- OleDbTransaction.cs
- LaxModeSecurityHeaderElementInferenceEngine.cs
- XmlCDATASection.cs
- ScriptMethodAttribute.cs
- FunctionCommandText.cs
- PermissionToken.cs
- ObfuscationAttribute.cs
- TargetControlTypeCache.cs
- DataTrigger.cs
- Mapping.cs
- SHA1CryptoServiceProvider.cs
- RectAnimationUsingKeyFrames.cs
- QuaternionAnimationUsingKeyFrames.cs
- VScrollProperties.cs
- Win32PrintDialog.cs
- SecurityUtils.cs
- CharUnicodeInfo.cs
- SchemaType.cs
- __Error.cs
- SchemaEntity.cs