Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / StringPropertyBuilder.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Missing.cs
- DesignOnlyAttribute.cs
- ButtonFlatAdapter.cs
- ConditionalAttribute.cs
- CodePropertyReferenceExpression.cs
- TypeElementCollection.cs
- OutOfMemoryException.cs
- GZipObjectSerializer.cs
- ApplicationSecurityInfo.cs
- GetPageCompletedEventArgs.cs
- ZipFileInfo.cs
- CatalogZone.cs
- SystemIcmpV4Statistics.cs
- ProxyWebPart.cs
- Events.cs
- RoleGroupCollection.cs
- StylusPointPropertyInfo.cs
- ParseChildrenAsPropertiesAttribute.cs
- DeferredSelectedIndexReference.cs
- ArithmeticException.cs
- autovalidator.cs
- ProgressChangedEventArgs.cs
- HtmlWindow.cs
- ArrayConverter.cs
- WebRequest.cs
- DrawingContext.cs
- TextTreeInsertElementUndoUnit.cs
- PathFigure.cs
- ObjectPersistData.cs
- FilterEventArgs.cs
- TimeoutException.cs
- DataTableClearEvent.cs
- TextEditorTyping.cs
- EditorServiceContext.cs
- DataTransferEventArgs.cs
- ScriptControlManager.cs
- Thread.cs
- DataServiceConfiguration.cs
- Point3DAnimationBase.cs
- XdrBuilder.cs
- VScrollProperties.cs
- datacache.cs
- Int64Animation.cs
- SectionXmlInfo.cs
- InputLangChangeEvent.cs
- AvTraceFormat.cs
- DefaultSection.cs
- StatusBarAutomationPeer.cs
- ExeContext.cs
- WebPartMinimizeVerb.cs
- DispatcherExceptionFilterEventArgs.cs
- SerializationBinder.cs
- MemberInfoSerializationHolder.cs
- ToolStripMenuItemCodeDomSerializer.cs
- Interfaces.cs
- XPathException.cs
- CodeGenerator.cs
- ExpressionNode.cs
- FirstMatchCodeGroup.cs
- StdRegProviderWrapper.cs
- DataBindingList.cs
- ExpandSegment.cs
- storepermissionattribute.cs
- ProviderConnectionPoint.cs
- SspiSafeHandles.cs
- SecurityException.cs
- GroupBoxDesigner.cs
- PrintControllerWithStatusDialog.cs
- OutputScope.cs
- SQLBytes.cs
- DefaultBindingPropertyAttribute.cs
- QueryTask.cs
- PingReply.cs
- WebControlParameterProxy.cs
- SqlBulkCopy.cs
- TextEditorTyping.cs
- XmlEncodedRawTextWriter.cs
- ActivityExecutionContextCollection.cs
- RSAPKCS1KeyExchangeFormatter.cs
- configsystem.cs
- ElementUtil.cs
- EntityContainer.cs
- PenThreadWorker.cs
- PropertyEntry.cs
- CustomAttributeBuilder.cs
- InfoCardTrace.cs
- NamedServiceModelExtensionCollectionElement.cs
- WinCategoryAttribute.cs
- HttpCookie.cs
- SequenceDesignerAccessibleObject.cs
- TextSegment.cs
- FrugalList.cs
- ColorMatrix.cs
- Group.cs
- WebPartVerbsEventArgs.cs
- SQLBytes.cs
- HttpCacheParams.cs
- Int32CAMarshaler.cs
- XmlSchemaGroupRef.cs
- HMACSHA512.cs