Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / UI / HtmlControls / HtmlTitle.cs / 1 / HtmlTitle.cs
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.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextEditorTables.cs
- ByteArrayHelperWithString.cs
- NetPipeSectionData.cs
- ListenerElementsCollection.cs
- CountAggregationOperator.cs
- RepeaterDataBoundAdapter.cs
- WebPartConnectionsDisconnectVerb.cs
- IgnoreSection.cs
- TabItemWrapperAutomationPeer.cs
- ParseHttpDate.cs
- FixedPosition.cs
- DataPagerFieldItem.cs
- GradientBrush.cs
- SqlDataSourceFilteringEventArgs.cs
- HwndKeyboardInputProvider.cs
- StaticResourceExtension.cs
- TdsParser.cs
- TrackBarRenderer.cs
- AdobeCFFWrapper.cs
- NullableConverter.cs
- RowParagraph.cs
- SweepDirectionValidation.cs
- SiteMap.cs
- CommandConverter.cs
- Emitter.cs
- ToolStripSeparatorRenderEventArgs.cs
- Point4DConverter.cs
- RegexNode.cs
- StyleXamlParser.cs
- XamlReaderHelper.cs
- EntityContainerEntitySet.cs
- StyleXamlParser.cs
- CngAlgorithmGroup.cs
- AdjustableArrowCap.cs
- SessionPageStateSection.cs
- DataGridItemCollection.cs
- ClassicBorderDecorator.cs
- ScalarOps.cs
- TextTreeTextBlock.cs
- PromptEventArgs.cs
- Decoder.cs
- UIElement3DAutomationPeer.cs
- PageEventArgs.cs
- HttpDebugHandler.cs
- RemoteWebConfigurationHostStream.cs
- RedirectionProxy.cs
- AssemblyCache.cs
- SharedUtils.cs
- XmlNodeReader.cs
- GlyphRunDrawing.cs
- FontStretch.cs
- ListItemCollection.cs
- HtmlMeta.cs
- SchemaImporter.cs
- TcpClientCredentialType.cs
- Literal.cs
- LassoHelper.cs
- Point3DAnimationBase.cs
- RegexCode.cs
- HandleCollector.cs
- ToolStripScrollButton.cs
- WasHttpHandlersInstallComponent.cs
- EncryptedData.cs
- LineSegment.cs
- DPAPIProtectedConfigurationProvider.cs
- DataGridCellClipboardEventArgs.cs
- FileNotFoundException.cs
- DataViewManagerListItemTypeDescriptor.cs
- TypeLibConverter.cs
- KeySpline.cs
- SqlNodeTypeOperators.cs
- ItemCheckedEvent.cs
- ObjectTypeMapping.cs
- SystemIPGlobalStatistics.cs
- MonitorWrapper.cs
- ScriptReference.cs
- XamlUtilities.cs
- DocumentGridPage.cs
- TypeDependencyAttribute.cs
- connectionpool.cs
- Brushes.cs
- MarshalDirectiveException.cs
- JoinElimination.cs
- BamlReader.cs
- ArrayWithOffset.cs
- FixedDocumentPaginator.cs
- CodeTypeDeclarationCollection.cs
- RewritingSimplifier.cs
- OutputScope.cs
- ObjectTag.cs
- HtmlInputFile.cs
- WebConfigurationManager.cs
- PtsCache.cs
- GPStream.cs
- ComponentCommands.cs
- Axis.cs
- WebPartConnectVerb.cs
- TraceUtility.cs
- XamlParser.cs
- OrderedDictionaryStateHelper.cs