Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / WebPartConnectVerb.cs / 1305376 / WebPartConnectVerb.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; internal sealed class WebPartConnectVerb : WebPartActionVerb { private string _defaultDescription; private string _defaultText; private string DefaultDescription { get { if (_defaultDescription == null) { _defaultDescription = SR.GetString(SR.WebPartConnectVerb_Description); } return _defaultDescription; } } private string DefaultText { get { if (_defaultText == null) { _defaultText = SR.GetString(SR.WebPartConnectVerb_Text); } return _defaultText; } } // Properties must look at viewstate directly instead of the property in the base class, // so we can distinguish between an unset property and a property set to String.Empty. [ WebSysDefaultValue(SR.WebPartConnectVerb_Description) ] public override string Description { get { object o = ViewState["Description"]; return (o == null) ? DefaultDescription : (string)o; } set { ViewState["Description"] = value; } } [ WebSysDefaultValue(SR.WebPartConnectVerb_Text) ] public override string Text { get { object o = ViewState["Text"]; return (o == null) ? DefaultText : (string)o; } set { ViewState["Text"] = value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; internal sealed class WebPartConnectVerb : WebPartActionVerb { private string _defaultDescription; private string _defaultText; private string DefaultDescription { get { if (_defaultDescription == null) { _defaultDescription = SR.GetString(SR.WebPartConnectVerb_Description); } return _defaultDescription; } } private string DefaultText { get { if (_defaultText == null) { _defaultText = SR.GetString(SR.WebPartConnectVerb_Text); } return _defaultText; } } // Properties must look at viewstate directly instead of the property in the base class, // so we can distinguish between an unset property and a property set to String.Empty. [ WebSysDefaultValue(SR.WebPartConnectVerb_Description) ] public override string Description { get { object o = ViewState["Description"]; return (o == null) ? DefaultDescription : (string)o; } set { ViewState["Description"] = value; } } [ WebSysDefaultValue(SR.WebPartConnectVerb_Text) ] public override string Text { get { object o = ViewState["Text"]; return (o == null) ? DefaultText : (string)o; } set { ViewState["Text"] = value; } } } } // 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
- RoleBoolean.cs
- MenuItem.cs
- ToolStripManager.cs
- TypeNameConverter.cs
- ClosableStream.cs
- Rotation3DAnimationUsingKeyFrames.cs
- SqlIdentifier.cs
- EdmToObjectNamespaceMap.cs
- DeclarativeCatalogPart.cs
- FactoryRecord.cs
- WriteTimeStream.cs
- FeatureSupport.cs
- PTUtility.cs
- DocumentViewerBase.cs
- PolyBezierSegment.cs
- SoapExtensionImporter.cs
- CancellableEnumerable.cs
- TrackingStringDictionary.cs
- Resources.Designer.cs
- SafeCryptHandles.cs
- ConnectionString.cs
- CompiledAction.cs
- EventEntry.cs
- CacheMemory.cs
- GetWinFXPath.cs
- SByteConverter.cs
- ProgressBarHighlightConverter.cs
- TypeToken.cs
- EventInfo.cs
- DataGridViewLayoutData.cs
- InstanceCreationEditor.cs
- StandardToolWindows.cs
- Permission.cs
- HwndKeyboardInputProvider.cs
- FontStyleConverter.cs
- LineUtil.cs
- NativeMethods.cs
- FragmentQueryProcessor.cs
- ChangePassword.cs
- SqlCommandBuilder.cs
- WeakEventManager.cs
- PagerSettings.cs
- RuntimeEnvironment.cs
- ClientTargetSection.cs
- HierarchicalDataSourceControl.cs
- Dump.cs
- ArgumentNullException.cs
- ImageCollectionCodeDomSerializer.cs
- Accessors.cs
- EpmContentSerializerBase.cs
- StringToken.cs
- XamlReaderConstants.cs
- DllNotFoundException.cs
- GraphicsContext.cs
- RichTextBoxConstants.cs
- DependencyObject.cs
- RuntimeHelpers.cs
- HtmlFormWrapper.cs
- XamlStream.cs
- WindowExtensionMethods.cs
- SwitchElementsCollection.cs
- EventDriven.cs
- SessionParameter.cs
- wgx_render.cs
- updatecommandorderer.cs
- Encoder.cs
- AbsoluteQuery.cs
- Inflater.cs
- ServiceSecurityAuditElement.cs
- TextEditorSpelling.cs
- WindowsHyperlink.cs
- BackgroundWorker.cs
- XmlSchemaFacet.cs
- AssemblyResourceLoader.cs
- DiffuseMaterial.cs
- Point3DCollectionConverter.cs
- WasEndpointConfigContainer.cs
- LiteralText.cs
- CustomSignedXml.cs
- X509Certificate2.cs
- DateTimeFormat.cs
- StatementContext.cs
- PackageFilter.cs
- CodeMemberEvent.cs
- OverrideMode.cs
- InvalidCommandTreeException.cs
- DataGridTemplateColumn.cs
- SortedSetDebugView.cs
- X509SecurityTokenAuthenticator.cs
- UnsafeNativeMethods.cs
- odbcmetadatafactory.cs
- ThrowHelper.cs
- InternalConfigRoot.cs
- ExpressionEditor.cs
- InstallerTypeAttribute.cs
- RegexCharClass.cs
- KeyManager.cs
- SiteMapSection.cs
- GridView.cs
- WinEventWrap.cs