Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / UI / StringPropertyBuilder.cs / 1 / StringPropertyBuilder.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.Collections; ////// Builds inner string properties. /// internal sealed class StringPropertyBuilder : ControlBuilder { private string _text; ////// Creates a new instance of StringPropertyBuilder. /// internal StringPropertyBuilder() { } internal StringPropertyBuilder(string text) { _text = text; } ////// Returns the inner text of the property. /// public string Text { get { return (_text == null) ? String.Empty : _text; } } ////// Gets the inner text of the property. /// public override void AppendLiteralString(string s) { if (ParentBuilder != null && ParentBuilder.HtmlDecodeLiterals()) s = HttpUtility.HtmlDecode(s); _text = s; } ////// Throws an exception - string properties cannot contain other objects. /// public override void AppendSubBuilder(ControlBuilder subBuilder) { throw new HttpException(SR.GetString(SR.StringPropertyBuilder_CannotHaveChildObjects, TagName, (ParentBuilder != null ? ParentBuilder.TagName : String.Empty))); } public override object BuildObject() { return Text; } public override void Init(TemplateParser parser, ControlBuilder parentBuilder, Type type, string tagName, string ID, IDictionary attribs) { base.Init(parser, parentBuilder, type /*type*/, tagName, ID, attribs); SetControlType(typeof(string)); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.Collections; ////// Builds inner string properties. /// internal sealed class StringPropertyBuilder : ControlBuilder { private string _text; ////// Creates a new instance of StringPropertyBuilder. /// internal StringPropertyBuilder() { } internal StringPropertyBuilder(string text) { _text = text; } ////// Returns the inner text of the property. /// public string Text { get { return (_text == null) ? String.Empty : _text; } } ////// Gets the inner text of the property. /// public override void AppendLiteralString(string s) { if (ParentBuilder != null && ParentBuilder.HtmlDecodeLiterals()) s = HttpUtility.HtmlDecode(s); _text = s; } ////// Throws an exception - string properties cannot contain other objects. /// public override void AppendSubBuilder(ControlBuilder subBuilder) { throw new HttpException(SR.GetString(SR.StringPropertyBuilder_CannotHaveChildObjects, TagName, (ParentBuilder != null ? ParentBuilder.TagName : String.Empty))); } public override object BuildObject() { return Text; } public override void Init(TemplateParser parser, ControlBuilder parentBuilder, Type type, string tagName, string ID, IDictionary attribs) { base.Init(parser, parentBuilder, type /*type*/, tagName, ID, attribs); SetControlType(typeof(string)); } } } // 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
- ExternalDataExchangeService.cs
- FormattedText.cs
- HttpContextBase.cs
- SQLInt64Storage.cs
- Rotation3D.cs
- SystemException.cs
- SecurityDocument.cs
- FillErrorEventArgs.cs
- VScrollBar.cs
- EventRoute.cs
- ListItemCollection.cs
- Error.cs
- ComPlusTraceRecord.cs
- Expressions.cs
- HttpCacheVaryByContentEncodings.cs
- XhtmlBasicSelectionListAdapter.cs
- StorageConditionPropertyMapping.cs
- DataGridPagerStyle.cs
- SqlAliasesReferenced.cs
- ConfigurationElementProperty.cs
- MdbDataFileEditor.cs
- PartialCachingAttribute.cs
- DigestTraceRecordHelper.cs
- QilXmlReader.cs
- GenericArgumentsUpdater.cs
- Content.cs
- Utils.cs
- Visual.cs
- OpenTypeLayout.cs
- Set.cs
- ThemeDirectoryCompiler.cs
- Metafile.cs
- HttpStreamXmlDictionaryReader.cs
- ToolZone.cs
- listitem.cs
- Permission.cs
- querybuilder.cs
- DebugView.cs
- NotSupportedException.cs
- AsymmetricKeyExchangeDeformatter.cs
- CredentialCache.cs
- JsonReader.cs
- WebServiceEnumData.cs
- DefaultTextStoreTextComposition.cs
- XPathDocumentBuilder.cs
- RC2CryptoServiceProvider.cs
- DataGridViewCellEventArgs.cs
- PartEditor.cs
- XmlUrlEditor.cs
- BaseUriWithWildcard.cs
- CollectionsUtil.cs
- XmlTextAttribute.cs
- ProcessThreadCollection.cs
- RegexFCD.cs
- PassportAuthentication.cs
- Exceptions.cs
- DateTimeConverter.cs
- ParseHttpDate.cs
- GroupBox.cs
- TabControlAutomationPeer.cs
- MultiDataTrigger.cs
- While.cs
- NonSerializedAttribute.cs
- DrawingBrush.cs
- PersistenceException.cs
- Run.cs
- EditorZone.cs
- ConsoleKeyInfo.cs
- SpellerError.cs
- StagingAreaInputItem.cs
- FixedSOMTextRun.cs
- ExtractedStateEntry.cs
- ImageAnimator.cs
- BaseComponentEditor.cs
- GlobalizationSection.cs
- XmlBinaryReader.cs
- MetadataWorkspace.cs
- ObjectManager.cs
- MaterializeFromAtom.cs
- EdmItemCollection.cs
- Itemizer.cs
- CompilerInfo.cs
- CodeAttributeDeclarationCollection.cs
- WizardForm.cs
- Pkcs7Recipient.cs
- HttpHandler.cs
- XmlSchemaValidator.cs
- sqlinternaltransaction.cs
- StringSorter.cs
- BrowserCapabilitiesCompiler.cs
- PixelShader.cs
- GeometryGroup.cs
- LogExtentCollection.cs
- storepermissionattribute.cs
- GridSplitter.cs
- PenContexts.cs
- MetabaseSettingsIis7.cs
- IPAddress.cs
- PageParserFilter.cs
- ToolStripSeparator.cs