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
- RegionIterator.cs
- DateBoldEvent.cs
- Faults.cs
- AmbientEnvironment.cs
- DataReaderContainer.cs
- Pen.cs
- XmlQualifiedName.cs
- Int16Storage.cs
- XmlSchema.cs
- ConfigurationLocationCollection.cs
- ActivationServices.cs
- FocusChangedEventArgs.cs
- RemotingException.cs
- MobileCapabilities.cs
- ListGeneralPage.cs
- XmlChildNodes.cs
- HttpGetServerProtocol.cs
- BitmapImage.cs
- KnownTypeAttribute.cs
- CatalogZone.cs
- SafeLibraryHandle.cs
- ReversePositionQuery.cs
- MailWebEventProvider.cs
- IWorkflowDebuggerService.cs
- SerializationFieldInfo.cs
- SafeProcessHandle.cs
- RouteParser.cs
- WindowsContainer.cs
- DataGridRelationshipRow.cs
- ChildChangedEventArgs.cs
- SerializableTypeCodeDomSerializer.cs
- Win32SafeHandles.cs
- DataListItem.cs
- ProtocolViolationException.cs
- GradientStop.cs
- EntityObject.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- Part.cs
- DataExpression.cs
- StrongNameUtility.cs
- CommandPlan.cs
- HatchBrush.cs
- SamlAuthorityBinding.cs
- XmlDictionaryReaderQuotas.cs
- LayoutUtils.cs
- FunctionDefinition.cs
- XmlNodeList.cs
- WebPartTransformer.cs
- DataGridHyperlinkColumn.cs
- PageRequestManager.cs
- WindowsEditBox.cs
- ChtmlImageAdapter.cs
- RepeaterItemEventArgs.cs
- ComEventsHelper.cs
- LazyLoadBehavior.cs
- StorageConditionPropertyMapping.cs
- querybuilder.cs
- FlatButtonAppearance.cs
- ResourceContainer.cs
- FirstMatchCodeGroup.cs
- SecurityTokenParametersEnumerable.cs
- ObjectConverter.cs
- KeyGestureValueSerializer.cs
- Region.cs
- ArgumentDirectionHelper.cs
- EnumBuilder.cs
- Adorner.cs
- COM2IProvidePropertyBuilderHandler.cs
- AutomationPropertyInfo.cs
- InputLanguageSource.cs
- FacetValueContainer.cs
- CDSsyncETWBCLProvider.cs
- ErrorInfoXmlDocument.cs
- TreeNodeSelectionProcessor.cs
- ModuleConfigurationInfo.cs
- SerialPort.cs
- CustomCategoryAttribute.cs
- BoundColumn.cs
- xamlnodes.cs
- UriParserTemplates.cs
- InternalMappingException.cs
- StringValidatorAttribute.cs
- TaiwanCalendar.cs
- MetabaseReader.cs
- DataRecordInfo.cs
- TextureBrush.cs
- SafeFileMappingHandle.cs
- AssertFilter.cs
- HttpHandlersSection.cs
- Cursors.cs
- RawStylusInput.cs
- StateItem.cs
- ActivityInstance.cs
- PropertyItem.cs
- PartialCachingControl.cs
- VisualTreeFlattener.cs
- LiteralControl.cs
- ComponentDispatcher.cs
- Table.cs
- ButtonBase.cs