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
- DataTableTypeConverter.cs
- Soap12ProtocolImporter.cs
- UIElement3D.cs
- XNodeValidator.cs
- ValueOfAction.cs
- IOThreadScheduler.cs
- NameValueFileSectionHandler.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- HttpDebugHandler.cs
- Sql8ExpressionRewriter.cs
- XmlWrappingWriter.cs
- NamespaceDecl.cs
- _NestedMultipleAsyncResult.cs
- ListMarkerLine.cs
- EntityContainerEmitter.cs
- SessionStateItemCollection.cs
- WebProxyScriptElement.cs
- EntityExpressionVisitor.cs
- GeometryConverter.cs
- HierarchicalDataSourceControl.cs
- VectorCollection.cs
- ConfigXmlReader.cs
- RedistVersionInfo.cs
- rsa.cs
- DistributedTransactionPermission.cs
- MemberDomainMap.cs
- Int32Converter.cs
- ForAllOperator.cs
- SoapParser.cs
- DictionarySectionHandler.cs
- EventManager.cs
- InputReferenceExpression.cs
- PersonalizationProviderHelper.cs
- Graph.cs
- SQLDecimalStorage.cs
- PeerApplication.cs
- Visual3DCollection.cs
- ObjectManager.cs
- DataGrid.cs
- TextInfo.cs
- ObjectView.cs
- CodeAttributeArgumentCollection.cs
- SocketElement.cs
- NavigationHelper.cs
- FontStretches.cs
- WorkflowDefinitionContext.cs
- SqlClientFactory.cs
- PropertyMap.cs
- CompoundFileIOPermission.cs
- StandardOleMarshalObject.cs
- TagPrefixInfo.cs
- SqlCommandBuilder.cs
- DataGridCaption.cs
- ColumnMapCopier.cs
- Classification.cs
- DefaultBindingPropertyAttribute.cs
- FileDialog_Vista_Interop.cs
- ServiceProviders.cs
- WindowsPrincipal.cs
- LogicalExpr.cs
- ToolStripOverflowButton.cs
- SeverityFilter.cs
- HealthMonitoringSection.cs
- StateChangeEvent.cs
- InternalConfigEventArgs.cs
- DataTrigger.cs
- AnimatedTypeHelpers.cs
- ProxyWebPart.cs
- AuthenticationModulesSection.cs
- SmtpMail.cs
- AbstractExpressions.cs
- ConnectionPointGlyph.cs
- ResourceAssociationTypeEnd.cs
- ResXResourceSet.cs
- SemaphoreFullException.cs
- AccessDataSourceDesigner.cs
- PropertyPathWorker.cs
- TiffBitmapDecoder.cs
- WaitingCursor.cs
- TextClipboardData.cs
- HttpVersion.cs
- DecimalConverter.cs
- wmiprovider.cs
- EncodedStreamFactory.cs
- DataColumnMappingCollection.cs
- Imaging.cs
- CompletionCallbackWrapper.cs
- log.cs
- PropertyPath.cs
- InfoCardRequestException.cs
- Encoding.cs
- SafeNativeMethods.cs
- Vector3DConverter.cs
- DependencyPropertyConverter.cs
- CacheDict.cs
- BinaryConverter.cs
- StackBuilderSink.cs
- StringValueSerializer.cs
- CoreSwitches.cs
- DataTrigger.cs