Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- XmlSchemaAll.cs
- CustomAttribute.cs
- CodeStatement.cs
- Win32Exception.cs
- basevalidator.cs
- LinkedList.cs
- Vector3DCollection.cs
- BindingCollection.cs
- PrimaryKeyTypeConverter.cs
- UpdateCommand.cs
- ToolBarButton.cs
- EventsTab.cs
- SymbolPair.cs
- CaseInsensitiveHashCodeProvider.cs
- MSAAEventDispatcher.cs
- NetCodeGroup.cs
- SqlClientPermission.cs
- ContainerParaClient.cs
- EpmSyndicationContentSerializer.cs
- ProfileService.cs
- NavigationEventArgs.cs
- XmlILOptimizerVisitor.cs
- ProfileGroupSettings.cs
- TextPattern.cs
- LinqDataSourceEditData.cs
- PostBackTrigger.cs
- MatrixCamera.cs
- Package.cs
- RuntimeConfigLKG.cs
- SqlDataSourceQueryEditor.cs
- DataBinding.cs
- TraceUtility.cs
- AnnotationResourceCollection.cs
- ProfileGroupSettingsCollection.cs
- _NetworkingPerfCounters.cs
- TextBox.cs
- X509WindowsSecurityToken.cs
- DomainConstraint.cs
- OrthographicCamera.cs
- Grant.cs
- ToolboxComponentsCreatingEventArgs.cs
- SamlAuthenticationStatement.cs
- WsdlParser.cs
- MDIClient.cs
- HttpGetProtocolImporter.cs
- GridViewUpdatedEventArgs.cs
- FormViewPagerRow.cs
- WebPartCatalogCloseVerb.cs
- SchemaImporterExtensionElement.cs
- BypassElement.cs
- WorkflowMarkupElementEventArgs.cs
- HttpRequestCacheValidator.cs
- SymbolEqualComparer.cs
- SignatureResourcePool.cs
- WorkflowServiceBuildProvider.cs
- ListViewAutomationPeer.cs
- PersonalizationAdministration.cs
- Utility.cs
- FlatButtonAppearance.cs
- Int32RectConverter.cs
- DbConnectionOptions.cs
- FileController.cs
- SqlEnums.cs
- ApplicationSecurityManager.cs
- WebPartManagerInternals.cs
- LayoutEvent.cs
- GeneralTransform2DTo3D.cs
- CaretElement.cs
- BaseDataList.cs
- HostedHttpTransportManager.cs
- RuntimeCompatibilityAttribute.cs
- DefaultIfEmptyQueryOperator.cs
- AuthenticationSection.cs
- CompilerGeneratedAttribute.cs
- ConnectionInterfaceCollection.cs
- ConnectionStringSettings.cs
- PrintController.cs
- FileDialog_Vista.cs
- SchemaTableColumn.cs
- DocComment.cs
- Hex.cs
- HeaderFilter.cs
- WSTrustFeb2005.cs
- SimpleWorkerRequest.cs
- DirtyTextRange.cs
- ConnectionInterfaceCollection.cs
- BamlReader.cs
- ControlUtil.cs
- ThreadStateException.cs
- ExpressionBuilderContext.cs
- RijndaelManaged.cs
- ExeConfigurationFileMap.cs
- DataPagerFieldCommandEventArgs.cs
- TextEffectResolver.cs
- PlaceHolder.cs
- DBSchemaTable.cs
- JoinGraph.cs
- ActivityXRefConverter.cs
- DocumentApplication.cs
- SourceFileBuildProvider.cs