Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MouseGestureConverter.cs
- FontWeightConverter.cs
- XsltArgumentList.cs
- BaseCollection.cs
- InvalidateEvent.cs
- assertwrapper.cs
- httpserverutility.cs
- DataAdapter.cs
- Effect.cs
- BamlLocalizer.cs
- TextEffect.cs
- Converter.cs
- printdlgexmarshaler.cs
- BindingExpressionBase.cs
- MainMenu.cs
- XhtmlBasicValidationSummaryAdapter.cs
- OutputCacheModule.cs
- IndentedWriter.cs
- DesignParameter.cs
- HttpFileCollectionBase.cs
- FileRecordSequenceCompletedAsyncResult.cs
- HyperLinkField.cs
- CounterCreationDataCollection.cs
- JsonStringDataContract.cs
- CompiledELinqQueryState.cs
- ActiveDesignSurfaceEvent.cs
- HierarchicalDataTemplate.cs
- QueryBranchOp.cs
- FixedDSBuilder.cs
- CallContext.cs
- StoreContentChangedEventArgs.cs
- SplashScreen.cs
- SmtpMail.cs
- DoubleAnimationUsingKeyFrames.cs
- TransformPatternIdentifiers.cs
- RadioButtonAutomationPeer.cs
- DataGridViewSelectedCellCollection.cs
- FloaterParagraph.cs
- safex509handles.cs
- DataStorage.cs
- DummyDataSource.cs
- CacheChildrenQuery.cs
- WebPartConnectionsConfigureVerb.cs
- DefaultValueAttribute.cs
- TimeZone.cs
- TextEndOfParagraph.cs
- AvTraceDetails.cs
- AssociationTypeEmitter.cs
- hebrewshape.cs
- Token.cs
- XslCompiledTransform.cs
- HistoryEventArgs.cs
- Bitmap.cs
- SessionPageStatePersister.cs
- SyndicationSerializer.cs
- DrawingImage.cs
- MainMenu.cs
- wmiprovider.cs
- InProcStateClientManager.cs
- XmlElementElementCollection.cs
- DiagnosticsConfiguration.cs
- ProxyWebPart.cs
- SingleStorage.cs
- Currency.cs
- X509Logo.cs
- SchemaTableOptionalColumn.cs
- CornerRadius.cs
- BooleanFunctions.cs
- IsolatedStorageFileStream.cs
- MatrixTransform.cs
- MatrixValueSerializer.cs
- RectAnimationUsingKeyFrames.cs
- HierarchicalDataBoundControl.cs
- IISUnsafeMethods.cs
- TrimSurroundingWhitespaceAttribute.cs
- ToolStripItemImageRenderEventArgs.cs
- EndPoint.cs
- ValidatedControlConverter.cs
- SpellCheck.cs
- StorageMappingFragment.cs
- Trace.cs
- WindowsSecurityToken.cs
- GridItem.cs
- ProviderMetadata.cs
- LoginName.cs
- SamlEvidence.cs
- ReferenceConverter.cs
- SetUserPreferenceRequest.cs
- SizeF.cs
- SqlMethodAttribute.cs
- MemberHolder.cs
- RTLAwareMessageBox.cs
- Helper.cs
- Selector.cs
- SchemaType.cs
- UndoEngine.cs
- IMembershipProvider.cs
- PageContent.cs
- CancellationTokenSource.cs
- GroupAggregateExpr.cs