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
- ZipIOLocalFileBlock.cs
- DataGridPageChangedEventArgs.cs
- DelegatingConfigHost.cs
- EventEntry.cs
- SafeNativeMethodsOther.cs
- FlowDocumentPage.cs
- SqlConnectionHelper.cs
- GroupLabel.cs
- RuleConditionDialog.cs
- CloseSequence.cs
- XmlHierarchicalDataSourceView.cs
- Accessible.cs
- Group.cs
- SplashScreen.cs
- GlyphShapingProperties.cs
- NativeMethodsCLR.cs
- HttpRuntime.cs
- HttpDictionary.cs
- Visual3D.cs
- ButtonBase.cs
- DBParameter.cs
- MailMessageEventArgs.cs
- KnownTypesHelper.cs
- ClassImporter.cs
- XsdValidatingReader.cs
- PointAnimationBase.cs
- Utils.cs
- CommandPlan.cs
- CollectionAdapters.cs
- AttributeQuery.cs
- XsdBuilder.cs
- Compiler.cs
- PanelStyle.cs
- GenericUriParser.cs
- complextypematerializer.cs
- BackgroundWorker.cs
- ArglessEventHandlerProxy.cs
- TableCellAutomationPeer.cs
- XmlSignatureProperties.cs
- Grant.cs
- ScriptControlManager.cs
- EntityProviderServices.cs
- HostDesigntimeLicenseContext.cs
- TabControlToolboxItem.cs
- CqlQuery.cs
- ExpressionCopier.cs
- WebConfigurationHostFileChange.cs
- UnsafeNativeMethods.cs
- TiffBitmapDecoder.cs
- EventMappingSettingsCollection.cs
- UnsafeNativeMethods.cs
- ISCIIEncoding.cs
- ObjectListTitleAttribute.cs
- GraphicsState.cs
- PersonalizableAttribute.cs
- KnowledgeBase.cs
- Expressions.cs
- TextBoxLine.cs
- DataGridViewCellFormattingEventArgs.cs
- DataGridTextBoxColumn.cs
- WebAdminConfigurationHelper.cs
- ILGenerator.cs
- GeometryDrawing.cs
- AddInIpcChannel.cs
- UnaryNode.cs
- EventInfo.cs
- SerializationAttributes.cs
- AsymmetricKeyExchangeDeformatter.cs
- Utils.cs
- ControlUtil.cs
- DoubleCollectionValueSerializer.cs
- LocalizedNameDescriptionPair.cs
- ControlType.cs
- DbConnectionPoolGroup.cs
- StringConverter.cs
- DrawingAttributeSerializer.cs
- TrackingParticipant.cs
- QilLoop.cs
- FontFamily.cs
- TransformPatternIdentifiers.cs
- BindStream.cs
- CaseCqlBlock.cs
- ErrorsHelper.cs
- Bits.cs
- DispatchWrapper.cs
- TreeNodeSelectionProcessor.cs
- XmlILStorageConverter.cs
- NonPrimarySelectionGlyph.cs
- NetworkCredential.cs
- NavigatorInput.cs
- LocalFileSettingsProvider.cs
- DiscoveryDocumentReference.cs
- returneventsaver.cs
- Sequence.cs
- MemoryMappedFileSecurity.cs
- HealthMonitoringSection.cs
- UserUseLicenseDictionaryLoader.cs
- Point.cs
- WindowShowOrOpenTracker.cs
- CardSpacePolicyElement.cs