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
- RolePrincipal.cs
- Process.cs
- ButtonRenderer.cs
- LabelTarget.cs
- ACE.cs
- AssemblyInfo.cs
- ChoiceConverter.cs
- CollectionBuilder.cs
- ControlDesignerState.cs
- UnhandledExceptionEventArgs.cs
- FtpWebRequest.cs
- UniformGrid.cs
- PersonalizationStateQuery.cs
- Timer.cs
- SqlDataSource.cs
- sqlpipe.cs
- log.cs
- BreakRecordTable.cs
- Delay.cs
- TextMessageEncodingBindingElement.cs
- FixedSOMLineCollection.cs
- DataGridViewRowsAddedEventArgs.cs
- ExtendedPropertyDescriptor.cs
- SqlNamer.cs
- HtmlTextArea.cs
- CodeGeneratorOptions.cs
- HttpResponseInternalWrapper.cs
- ProfileGroupSettings.cs
- SqlNodeAnnotation.cs
- ProxyWebPartManager.cs
- BindingExpressionUncommonField.cs
- UpdateExpressionVisitor.cs
- OleDbException.cs
- EpmSyndicationContentSerializer.cs
- DateTimeFormat.cs
- CategoryAttribute.cs
- DefaultDialogButtons.cs
- MachineKeySection.cs
- ItemsControl.cs
- TableRowCollection.cs
- SerializationInfo.cs
- TextBoxView.cs
- PathStreamGeometryContext.cs
- RtfControlWordInfo.cs
- FontFamily.cs
- ComplexPropertyEntry.cs
- TransformedBitmap.cs
- TraceProvider.cs
- SchemaAttDef.cs
- Clause.cs
- MultiSelectRootGridEntry.cs
- ZipFileInfo.cs
- SessionEndingEventArgs.cs
- Pens.cs
- Application.cs
- SafeSecurityHandles.cs
- InterleavedZipPartStream.cs
- AppSecurityManager.cs
- SessionPageStatePersister.cs
- PersistChildrenAttribute.cs
- XmlSerializationWriter.cs
- DaylightTime.cs
- SymDocumentType.cs
- Selection.cs
- Encoder.cs
- TemplatedMailWebEventProvider.cs
- ExpressionWriter.cs
- RightsManagementInformation.cs
- XNodeNavigator.cs
- FileDialog.cs
- _ConnectionGroup.cs
- Vector.cs
- _LoggingObject.cs
- GeneralTransformGroup.cs
- FormattedTextSymbols.cs
- ObjectContext.cs
- ContextMenuStripGroupCollection.cs
- TypeTypeConverter.cs
- DataObject.cs
- PeerPresenceInfo.cs
- CodeDomSerializationProvider.cs
- PartitionerQueryOperator.cs
- FileUtil.cs
- BodyWriter.cs
- ApplicationTrust.cs
- HttpCachePolicyElement.cs
- WindowsSysHeader.cs
- SortableBindingList.cs
- ScrollEventArgs.cs
- IndexedGlyphRun.cs
- IFormattable.cs
- Baml2006SchemaContext.cs
- PerformanceCounterPermissionEntryCollection.cs
- ResumeStoryboard.cs
- SByteStorage.cs
- BeginSelectCardRequest.cs
- XhtmlBasicSelectionListAdapter.cs
- InstanceOwnerException.cs
- SqlDesignerDataSourceView.cs
- IISUnsafeMethods.cs