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
- HttpRuntime.cs
- DbConnectionPool.cs
- SQLDateTime.cs
- ProtocolInformationReader.cs
- UdpDuplexChannel.cs
- StringBlob.cs
- ParseNumbers.cs
- DetailsViewInsertedEventArgs.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- TabItemWrapperAutomationPeer.cs
- ReturnType.cs
- CatalogZoneBase.cs
- MethodToken.cs
- ConfigurationManagerHelperFactory.cs
- sqlinternaltransaction.cs
- MetadataUtil.cs
- ProjectionRewriter.cs
- CommandLineParser.cs
- MappingItemCollection.cs
- FloaterBaseParaClient.cs
- PolyBezierSegment.cs
- MetadataPropertyvalue.cs
- X509UI.cs
- PrintDialogDesigner.cs
- ProjectionPath.cs
- ClientSettingsStore.cs
- CriticalFileToken.cs
- Contracts.cs
- TreeViewBindingsEditor.cs
- cookiecollection.cs
- PrintEvent.cs
- Compiler.cs
- DataGridAddNewRow.cs
- UpdateExpressionVisitor.cs
- MenuAdapter.cs
- LinqDataView.cs
- AlternateView.cs
- ClassicBorderDecorator.cs
- Set.cs
- TokenBasedSet.cs
- TabControl.cs
- DoubleConverter.cs
- WebServiceData.cs
- OracleParameterCollection.cs
- OracleInfoMessageEventArgs.cs
- Script.cs
- MessageHeaderException.cs
- RayMeshGeometry3DHitTestResult.cs
- COM2IDispatchConverter.cs
- ReadOnlyPropertyMetadata.cs
- DataGridViewRowCancelEventArgs.cs
- PageDeviceFont.cs
- Selection.cs
- GradientBrush.cs
- FixedSOMContainer.cs
- WriteTimeStream.cs
- PkcsMisc.cs
- Bezier.cs
- ObjectSet.cs
- ScaleTransform3D.cs
- Help.cs
- ELinqQueryState.cs
- RootBrowserWindowProxy.cs
- FormatterServicesNoSerializableCheck.cs
- DataPagerFieldCommandEventArgs.cs
- DocumentGrid.cs
- RandomNumberGenerator.cs
- EdmToObjectNamespaceMap.cs
- LocationEnvironment.cs
- DurableInstance.cs
- ByeOperation11AsyncResult.cs
- FontStretch.cs
- InternalConfigHost.cs
- AssemblyResourceLoader.cs
- AmbientProperties.cs
- Equal.cs
- InstanceCreationEditor.cs
- newinstructionaction.cs
- WindowsSpinner.cs
- HttpCookie.cs
- StorageEntitySetMapping.cs
- ServiceEndpointCollection.cs
- ConfigurationValidatorAttribute.cs
- MailMessage.cs
- SuppressMessageAttribute.cs
- MeasureData.cs
- IISMapPath.cs
- HandlerFactoryWrapper.cs
- Win32Native.cs
- SecurityTokenProvider.cs
- XmlNotation.cs
- FactoryRecord.cs
- StaticContext.cs
- UshortList2.cs
- BaseServiceProvider.cs
- OleCmdHelper.cs
- ToolboxControl.cs
- OpenTypeLayout.cs
- TextTreeFixupNode.cs
- MiniLockedBorderGlyph.cs