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
- TableItemPattern.cs
- DocumentPageViewAutomationPeer.cs
- _MultipleConnectAsync.cs
- ContentElement.cs
- TypeToken.cs
- Int32AnimationUsingKeyFrames.cs
- SqlCacheDependency.cs
- DrawingCollection.cs
- TemplateControlCodeDomTreeGenerator.cs
- DataServiceProcessingPipeline.cs
- Header.cs
- GridView.cs
- StickyNoteHelper.cs
- AdministrationHelpers.cs
- LightweightEntityWrapper.cs
- PrintingPermission.cs
- RenamedEventArgs.cs
- UITypeEditor.cs
- PolyBezierSegment.cs
- TextCompositionManager.cs
- ManagementOptions.cs
- M3DUtil.cs
- RenamedEventArgs.cs
- UnknownWrapper.cs
- PseudoWebRequest.cs
- ExpressionDumper.cs
- XmlCharacterData.cs
- AuthenticationModuleElement.cs
- DataBinding.cs
- HierarchicalDataBoundControl.cs
- ListViewInsertionMark.cs
- TopClause.cs
- VectorConverter.cs
- SkipStoryboardToFill.cs
- ValueUtilsSmi.cs
- PropertyPathWorker.cs
- XmlDocument.cs
- SignerInfo.cs
- __Error.cs
- ColumnWidthChangingEvent.cs
- MediaPlayerState.cs
- HotSpotCollection.cs
- Int32Collection.cs
- SHA1Managed.cs
- Scripts.cs
- TemplateInstanceAttribute.cs
- DetailsViewCommandEventArgs.cs
- ProfileProvider.cs
- QilIterator.cs
- NumberFormatInfo.cs
- TypedRowGenerator.cs
- SoapExtensionTypeElementCollection.cs
- SeekStoryboard.cs
- UserPreferenceChangingEventArgs.cs
- HtmlTableCellCollection.cs
- Win32PrintDialog.cs
- HttpPostLocalhostServerProtocol.cs
- StyleSelector.cs
- SinglePhaseEnlistment.cs
- SerializationFieldInfo.cs
- UIPermission.cs
- DiscreteKeyFrames.cs
- CompoundFileReference.cs
- DataControlButton.cs
- ExpressionPrinter.cs
- GlobalizationAssembly.cs
- AnnotationMap.cs
- User.cs
- DataGridTable.cs
- EdmItemError.cs
- SettingsPropertyCollection.cs
- SQLInt32Storage.cs
- ExtensionDataReader.cs
- MatrixAnimationUsingKeyFrames.cs
- TemplatedMailWebEventProvider.cs
- _ContextAwareResult.cs
- ViewManager.cs
- GroupItemAutomationPeer.cs
- SqlUDTStorage.cs
- Emitter.cs
- PackWebRequestFactory.cs
- WindowsTokenRoleProvider.cs
- SqlDeflator.cs
- AssemblyCollection.cs
- UserPersonalizationStateInfo.cs
- ActiveXHelper.cs
- WebServiceHost.cs
- TreeView.cs
- HttpsHostedTransportConfiguration.cs
- ObjectResult.cs
- UTF7Encoding.cs
- OdbcTransaction.cs
- TreeNodeEventArgs.cs
- UrlMappingsSection.cs
- coordinatorfactory.cs
- StorageMappingItemLoader.cs
- EmbeddedMailObject.cs
- Track.cs
- XmlAttribute.cs
- TemplateBindingExpression.cs