Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ConnectionsZone Class

Provides a user interface (UI) that enables users to form connections between WebPart and other server controls that reside in WebPartZoneBase zones.

Namespace:  System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)
public class ConnectionsZone : ToolZone
<asp:ConnectionsZone />

The ConnectionsZone type exposes the following members.

  NameDescription
Public methodConnectionsZoneInitializes a new instance of the ConnectionsZone class.
Top
  NameDescription
Public propertyAccessKeyGets or sets the access key that allows you to quickly navigate to the Web server control. (Inherited from WebControl.)
Protected propertyAdapterGets the browser-specific adapter for the control. (Inherited from Control.)
Public propertyAppRelativeTemplateSourceDirectoryGets or sets the application-relative virtual directory of the Page or UserControl object that contains this control. (Inherited from Control.)
Public propertyAssociatedDisplayModesGets the collection of WebPartDisplayMode objects that are associated with a particular ToolZone zone. (Inherited from ToolZone.)
Public propertyAttributesGets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control. (Inherited from WebControl.)
Public propertyBackColorGets or sets the background color of the Web server control. (Inherited from WebControl.)
Public propertyBackImageUrlGets or sets the URL to a background image for a zone. (Inherited from WebZone.)
Public propertyBindingContainerInfrastructure. Gets the control that contains this control's data binding. (Inherited from Control.)
Public propertyBorderColorGets or sets the border color of the Web control. (Inherited from WebControl.)
Public propertyBorderStyleGets or sets the border style of the Web server control. (Inherited from WebControl.)
Public propertyBorderWidthGets or sets the border width of the Web server control. (Inherited from WebControl.)
Public propertyCancelVerbGets a reference to a WebPartVerb object that enables end users to cancel the process of establishing a connection.
Protected propertyChildControlsCreatedGets a value that indicates whether the server control's child controls have been created. (Inherited from Control.)
Public propertyClientIDGets the control ID for HTML markup that is generated by ASP.NET. (Inherited from Control.)
Public propertyClientIDModeGets or sets the algorithm that is used to generate the value of the ClientID property. (Inherited from Control.)
Protected propertyClientIDSeparatorGets a character value representing the separator character used in the ClientID property. (Inherited from Control.)
Public propertyCloseVerbGets a reference to a WebPartVerb object that enables end users to close the connection user interface (UI) created by the ConnectionsZone control.
Public propertyConfigureConnectionTitleGets or sets the text displayed as the title of a subsection of the connection user interface (UI) created by a ConnectionsZone control.
Public propertyConfigureVerbGets a reference to a WebPartVerb object used to open the configuration view in the connection user interface (UI).
Public propertyConnectToConsumerInstructionTextGets or sets the instructional text displayed in the section of the connection user interface (UI) where users select a consumer connection point that the provider will connect to.
Public propertyConnectToConsumerTextGets or sets the text of a hyperlink that users click to open a view in which they can choose a consumer control for a connection.
Public propertyConnectToConsumerTitleGets or sets the title text of the section in the connection user interface (UI) in which users can select a specific consumer to connect with.
Public propertyConnectToProviderInstructionTextGets or sets the instructional text displayed in the section of the connection user interface (UI) where users select a provider connection point that the consumer will connect to.
Public propertyConnectToProviderTextGets or sets the text of a hyperlink that users click to open a view in which they can choose a provider control for a connection.
Public propertyConnectToProviderTitleGets or sets the title text of the section in the connection user interface (UI) in which users can select a specific provider to connect with.
Public propertyConnectVerbGets a reference to a WebPartVerb object that enables two WebPart controls to establish a connection.
Public propertyConsumersInstructionTextGets or sets the instructional text shown in the consumers section of the connection user interface (UI), when a connection already exists.
Public propertyConsumersTitleGets or sets the title shown above the consumers section of the connection user interface (UI), when a connection already exists.
Protected propertyContextGets the HttpContext object associated with the server control for the current Web request. (Inherited from Control.)
Public propertyControlsGets a ControlCollection object that represents the child controls in a CompositeControl. (Inherited from CompositeControl.)
Public propertyControlStyleGets the style of the Web server control. This property is used primarily by control developers. (Inherited from WebControl.)
Public propertyControlStyleCreatedGets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers. (Inherited from WebControl.)
Public propertyCssClassGets or sets the Cascading Style Sheet (CSS) class rendered by the Web server control on the client. (Inherited from WebControl.)
Public propertyDataItemContainerGets a reference to the naming container if the naming container implements IDataItemContainer. (Inherited from Control.)
Public propertyDataKeysContainerGets a reference to the naming container if the naming container implements IDataKeysControl. (Inherited from Control.)
Protected propertyDesignModeGets a value indicating whether a control is being used on a design surface. (Inherited from Control.)
Public propertyDisconnectVerbGets a reference to a WebPartVerb object that enables a user to disconnect two connected WebPart controls.
Protected propertyDisplayGets a value that indicates whether a ToolZone control is currently displayed. (Overrides ToolZone.Display.)
Public propertyEditUIStyleGets the style attributes for the editable controls contained in a ToolZone control. (Inherited from ToolZone.)
Public propertyEmptyZoneTextGets or sets a text message that is displayed in an empty ConnectionsZone control if there are insufficient controls on a Web page to establish a connection. (Overrides WebZone.EmptyZoneText.)
Public propertyEmptyZoneTextStyleGets the style attributes for the placeholder text in an empty zone. (Inherited from WebZone.)
Public propertyEnabledGets or sets a value indicating whether the Web server control is enabled. (Inherited from WebControl.)
Public propertyEnableThemingGets or sets a value indicating whether themes apply to this control. (Inherited from WebControl.)
Public propertyEnableViewStateGets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client. (Inherited from Control.)
Public propertyErrorStyleGets the style attributes for rendering the error message that is displayed if a WebPart control cannot be loaded or created. (Inherited from WebZone.)
Protected propertyEventsGets a list of event handler delegates for the control. This property is read-only. (Inherited from Control.)
Public propertyExistingConnectionErrorMessageGets or sets the text of a message displayed in the connection user interface (UI) when there is an error or warning on an existing connection.
Public propertyFontGets the font properties associated with the Web server control. (Inherited from WebControl.)
Public propertyFooterStyleGets the style attributes for the contents of a zone's footer area. (Inherited from WebZone.)
Public propertyForeColorGets or sets the foreground color (typically the color of the text) of the Web server control. (Inherited from WebControl.)
Public propertyGetFromTextGets or sets the text shown in the section of the connection user interface (UI) that precedes the named provider from which a consumer will retrieve data.
Public propertyGetTextGets or sets the text shown in the section of the connection user interface (UI) that precedes the named consumer that will receive data from a provider.
Public propertyHasAttributesGets a value indicating whether the control has attributes set. (Inherited from WebControl.)
Protected propertyHasChildViewStateGets a value indicating whether the current server control's child controls have any saved view-state settings. (Inherited from Control.)
Protected propertyHasFooterGets a value indicating whether a zone has a footer area. (Inherited from WebZone.)
Protected propertyHasHeaderGets a value indicating whether a zone has a header area. (Inherited from WebZone.)
Public propertyHeaderCloseVerbGets a reference to the WebPartVerb object in the header of a ToolZone control that is used to close the control. (Inherited from ToolZone.)
Public propertyHeaderStyleGets the style attributes for the contents of a zone's header area. (Inherited from WebZone.)
Public propertyHeaderTextGets or sets the header text that appears at the top of the connection user interface (UI) created by the ConnectionsZone control. (Overrides WebZone.HeaderText.)
Public propertyHeaderVerbStyleGets the style attributes for all header verbs displayed in a ToolZone control. (Inherited from ToolZone.)
Public propertyHeightGets or sets the height of the Web server control. (Inherited from WebControl.)
Public propertyIDGets or sets the programmatic identifier assigned to the server control. (Inherited from Control.)
Protected propertyIdSeparatorInfrastructure. Gets the character used to separate control identifiers. (Inherited from Control.)
Public propertyInstructionTextGets or set the text that is used for general instructions about the selected control in the section of the connection user interface (UI) for managing existing connections. (Overrides ToolZone.InstructionText.)
Public propertyInstructionTextStyleGets the style attributes for the instruction text that appears at the top of a ToolZone control. (Inherited from ToolZone.)
Public propertyInstructionTitleGets or sets the text that is used for a general description of the action that can be performed on the consumer or provider control, within the connection user interface (UI) for managing existing connections.
Protected propertyIsChildControlStateClearedGets a value indicating whether controls contained within this control have control state. (Inherited from Control.)
Protected propertyIsEnabledGets a value indicating whether the control is enabled. (Inherited from WebControl.)
Protected propertyIsTrackingViewStateGets a value that indicates whether the server control is saving changes to its view state. (Inherited from Control.)
Protected propertyIsViewStateEnabledGets a value indicating whether view state is enabled for this control. (Inherited from Control.)
Public propertyLabelStyleGets the style attributes for the contents of the labels that appear alongside the editing controls within a ToolZone control. The derived ToolZone controls, such as CatalogZone and EditorZone, apply the styles to the labels. (Inherited from ToolZone.)
Protected propertyLoadViewStateByIDGets a value indicating whether the control participates in loading its view state by ID instead of index. (Inherited from Control.)
Public propertyNamingContainerGets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same Control.ID property value. (Inherited from Control.)
Public propertyNewConnectionErrorMessageGets or sets the text of a message displayed in the connection user interface (UI) when there is an error or warning on a new connection that a user tries to create.
Public propertyNoExistingConnectionInstructionTextGets or sets the instruction text that appears in the body of the connection user interface (UI) when a Web Parts control has no existing connection.
Public propertyNoExistingConnectionTitleGets or sets the title text that appears in the body of the connection user interface (UI) when a Web Parts control has no existing connection.
Public propertyPaddingGets or sets the cell padding attributes on the table that contains the WebPart controls in a zone. (Inherited from WebZone.)
Public propertyPageGets a reference to the Page instance that contains the server control. (Inherited from Control.)
Public propertyParentGets a reference to the server control's parent control in the page control hierarchy. (Inherited from Control.)
Public propertyPartChromePaddingGets or sets the distance between the contents of a WebPart control and the border of the control. (Inherited from WebZone.)
Public propertyPartChromeStyleGets style characteristics that apply to the borders of Web Parts controls contained by a zone. (Inherited from WebZone.)
Public propertyPartChromeTypeGets or sets the type of border that frames the server controls contained in a ConnectionsZone control. (Overrides WebZone.PartChromeType.)
Public propertyPartStyleGets style characteristics that apply to the border and contents of each Web Parts control contained by a zone. (Inherited from WebZone.)
Public propertyPartTitleStyleGets style attributes for the title bar content for each Web Parts control contained by a zone. (Inherited from WebZone.)
Public propertyProvidersInstructionTextGets or sets the instructional text shown in the providers section of the connection user interface (UI), when a connection already exists.
Public propertyProvidersTitleGets or sets the title shown above the providers section of the connection user interface (UI), when a connection already exists.
Protected propertyRenderClientScriptGets a value that indicates whether to render client script on a Web Parts page. (Inherited from WebZone.)
Public propertyRenderingCompatibilityGets a value that specifies the ASP.NET version that rendered HTML will be compatible with. (Inherited from Control.)
Public propertySendTextGets or sets the text shown in the section of the connection user interface (UI) that precedes the named provider that will send data to a consumer.
Public propertySendToTextGets or sets the text shown in the section of the connection user interface (UI) that precedes the named consumer to which a provider will send data.
Public propertySiteGets information about the container that hosts the current control when rendered on a design surface. (Inherited from Control.)
Public propertySkinIDGets or sets the skin to apply to the control. (Inherited from WebControl.)
Public propertyStyleGets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control. (Inherited from WebControl.)
Public propertySupportsDisabledAttributeGets a value that indicates whether the control should set the disabled attribute of the rendered HTML element to "disabled" when the control's IsEnabled property is false. (Inherited from CompositeControl.)
Public propertyTabIndexGets or sets the tab index of the Web server control. (Inherited from WebControl.)
Protected propertyTagKeyGets the HtmlTextWriterTag value that corresponds to this Web server control. This property is used primarily by control developers. (Inherited from WebZone.)
Protected propertyTagNameGets the name of the control tag. This property is used primarily by control developers. (Inherited from WebControl.)
Public propertyTemplateControlGets or sets a reference to the template that contains this control. (Inherited from Control.)
Public propertyTemplateSourceDirectoryGets the virtual directory of the Page or UserControl that contains the current server control. (Inherited from Control.)
Public propertyToolTipGets or sets the text displayed when the mouse pointer hovers over the Web server control. (Inherited from WebControl.)
Public propertyUniqueIDGets the unique, hierarchically qualified identifier for the server control. (Inherited from Control.)
Public propertyValidateRequestModeGets or sets a value that indicates whether the control checks client input from the browser for potentially dangerous values. (Inherited from Control.)
Public propertyVerbButtonTypeGets or sets what kind of button is used to represent verbs in a zone. (Inherited from WebZone.)
Public propertyVerbStyleGets the style attributes for the user interface (UI) verbs associated with Web Parts controls in a zone. (Inherited from WebZone.)
Protected propertyViewStateGets a dictionary of state information that allows you to save and restore the view state of a server control across multiple requests for the same page. (Inherited from Control.)
Protected propertyViewStateIgnoresCaseGets a value that indicates whether the StateBag object is case-insensitive. (Inherited from Control.)
Public propertyViewStateModeGets or sets the view-state mode of this control. (Inherited from Control.)
Public propertyVisibleGets or sets a value that indicates whether a server control is rendered as a user interface (UI) element on the page. (Inherited from ToolZone.)
Protected propertyWebPartManagerGets a reference to the WebPartManager control associated with a WebZone control instance on a Web Parts page. (Inherited from WebZone.)
Protected propertyWebPartToConnectGets the currently selected WebPart control to connect to.
Public propertyWidthGets or sets the width of the Web server control. (Inherited from WebControl.)
Top
  NameDescription
Protected methodAddAttributesToRenderAdds HTML attributes and styles that need to be rendered to the specified HtmlTextWriterTag. This method is used primarily by control developers. (Inherited from WebControl.)
Protected methodAddedControlCalled after a child control is added to the Controls collection of the Control object. (Inherited from Control.)
Protected methodAddParsedSubObjectNotifies the server control that an element, either XML or HTML, was parsed, and adds the element to the server control's ControlCollection object. (Inherited from Control.)
Public methodApplyStyleCopies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers. (Inherited from WebControl.)
Public methodApplyStyleSheetSkinApplies the style properties defined in the page style sheet to the control. (Inherited from Control.)
Protected methodBeginRenderTracingBegins design-time tracing of rendering data. (Inherited from Control.)
Protected methodBuildProfileTreeInfrastructure. Gathers information about the server control and delivers it to the Trace property to be displayed when tracing is enabled for the page. (Inherited from Control.)
Protected methodClearCachedClientIDInfrastructure. Sets the cached ClientID value to null. (Inherited from Control.)
Protected methodClearChildControlStateDeletes the control-state information for the server control's child controls. (Inherited from Control.)
Protected methodClearChildStateDeletes the view-state and control-state information for all the server control's child controls. (Inherited from Control.)
Protected methodClearChildViewStateDeletes the view-state information for all the server control's child controls. (Inherited from Control.)
Protected methodClearEffectiveClientIDModeInfrastructure. Sets the ClientIDMode property of the current control instance and of any child controls to Inherit. (Inherited from Control.)
Protected methodCloseCloses the connection user interface (UI) created by the ConnectionsZone control. (Overrides ToolZone.Close().)
Public methodCopyBaseAttributesCopies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers. (Inherited from WebControl.)
Protected methodCreateChildControlsCreates all child controls contained in a ConnectionsZone control in preparation for posting back to the server or rendering. (Overrides Control.CreateChildControls().)
Protected methodCreateControlCollectionCreates a new ControlCollection object to hold the child controls (both literal and server) of the server control. (Inherited from Control.)
Protected methodCreateControlStyleCreates the style object that is used internally by the WebControl class to implement all style related properties. This method is used primarily by control developers. (Inherited from WebControl.)
Public methodDataBind()Binds a data source to the CompositeControl and all its child controls. (Inherited from CompositeControl.)
Protected methodDataBind(Boolean)Binds a data source to the invoked server control and all its child controls with an option to raise the DataBinding event. (Inherited from Control.)
Protected methodDataBindChildrenBinds a data source to the server control's child controls. (Inherited from Control.)
Public methodDisposeEnables a server control to perform final clean up before it is released from memory. (Inherited from Control.)
Protected methodEndRenderTracingEnds design-time tracing of rendering data. (Inherited from Control.)
Protected methodEnsureChildControlsDetermines whether the server control contains child controls. If it does not, it creates child controls. (Inherited from Control.)
Protected methodEnsureIDCreates an identifier for controls that do not have an identifier assigned. (Inherited from Control.)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodFindControl(String)Searches the current naming container for a server control with the specified id parameter. (Inherited from Control.)
Protected methodFindControl(String, Int32)Infrastructure. Searches the current naming container for a server control with the specified id and an integer, specified in the pathOffset parameter, which aids in the search. You should not override this version of the FindControl method. (Inherited from Control.)
Public methodFocusSets input focus to a control. (Inherited from Control.)
Protected methodGetDesignModeStateInfrastructure. Gets design-time data for a control. (Inherited from Control.)
Public methodGetEffectiveChromeTypeReturns the actual or effective current PartChromeType value of a WebPart control, given the PartChromeType property of the zone and the current display mode of the Web Parts page. (Inherited from WebZone.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetRouteUrl(Object)Gets the URL that corresponds to a set of route parameters. (Inherited from Control.)
Public methodGetRouteUrl(RouteValueDictionary)Gets the URL that corresponds to a set of route parameters. (Inherited from Control.)
Public methodGetRouteUrl(String, Object)Gets the URL that corresponds to a set of route parameters and a route name. (Inherited from Control.)
Public methodGetRouteUrl(String, RouteValueDictionary)Gets the URL that corresponds to a set of route parameters and a route name. (Inherited from Control.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetUniqueIDRelativeToReturns the prefixed portion of the UniqueID property of the specified control. (Inherited from Control.)
Public methodHasControlsDetermines if the server control contains any child controls. (Inherited from Control.)
Protected methodHasEventsReturns a value indicating whether events are registered for the control or any child controls. (Inherited from Control.)
Protected methodIsLiteralContentInfrastructure. Determines if the server control holds only literal content. (Inherited from Control.)
Protected methodLoadControlStateRestores control state information from a previous page request that was saved by the SaveControlState method. (Overrides Control.LoadControlState(Object).)
Protected methodLoadViewStateRestores view-state information from a previous page request that was saved by the SaveViewState method. (Overrides ToolZone.LoadViewState(Object).)
Protected methodMapPathSecureRetrieves the physical path that a virtual path, either absolute or relative, maps to. (Inherited from Control.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodMergeStyleCopies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers. (Inherited from WebControl.)
Protected methodOnBubbleEventDetermines whether the event for the server control is passed up the page's UI server control hierarchy. (Inherited from Control.)
Protected methodOnDataBindingRaises the DataBinding event. (Inherited from Control.)
Protected methodOnDisplayModeChangedRaises the DisplayModeChanged event. (Overrides ToolZone.OnDisplayModeChanged(Object, WebPartDisplayModeEventArgs).)
Protected methodOnInitRaises the Init event. (Overrides ToolZone.OnInit(EventArgs).)
Protected methodOnLoadRaises the Load event. (Inherited from Control.)
Protected methodOnPreRenderRaises the PreRender event. (Inherited from WebZone.)
Protected methodOnSelectedWebPartChangedRaises the SelectedWebPartChanged event. (Overrides ToolZone.OnSelectedWebPartChanged(Object, WebPartEventArgs).)
Protected methodOnUnloadRaises the Unload event. (Inherited from Control.)
Protected methodOpenFileGets a Stream used to read a file. (Inherited from Control.)
Protected methodRaiseBubbleEventAssigns any sources of the event and its information to the control's parent. (Inherited from Control.)
Protected methodRaisePostBackEventRaises an event for the ConnectionsZone control when the form that contains it posts back to the server. (Overrides ToolZone.RaisePostBackEvent(String).)
Protected methodRecreateChildControlsRecreates the child controls in a control derived from CompositeControl. (Inherited from CompositeControl.)
Protected methodRemovedControlCalled after a child control is removed from the Controls collection of the Control object. (Inherited from Control.)
Protected methodRenderRenders the contents of the ConnectionsZone control to the specified HtmlTextWriter object. (Overrides CompositeControl.Render(HtmlTextWriter).)
Public methodRenderBeginTagRenders the opening HTML tag of the zone control to the specified HtmlTextWriter object. (Inherited from WebZone.)
Protected methodRenderBodySends the content of a ConnectionsZone control's body area to the specified HtmlTextWriter object, which writes the content to the Web page. (Overrides WebZone.RenderBody(HtmlTextWriter).)
Protected methodRenderChildrenOutputs the content of a server control's children to a provided HtmlTextWriter object, which writes the content to be rendered on the client. (Inherited from Control.)
Protected methodRenderContentsRenders the entire contents of a zone control between the beginning and ending tags to the specified HtmlTextWriter object. (Inherited from WebZone.)
Public methodRenderControl(HtmlTextWriter)Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled. (Inherited from Control.)
Protected methodRenderControl(HtmlTextWriter, ControlAdapter)Outputs server control content to a provided HtmlTextWriter object using a provided ControlAdapter object. (Inherited from Control.)
Public methodRenderEndTagRenders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers. (Inherited from WebControl.)
Protected methodRenderFooterOverrides the base method to render verbs in the footer of a ToolZone control. (Inherited from ToolZone.)
Protected methodRenderHeaderOverrides the base method to provide specialized rendering for the header area required by ToolZone controls. (Inherited from ToolZone.)
Protected methodRenderVerbRenders an individual verb with a ToolZone control. (Inherited from ToolZone.)
Protected methodRenderVerbsRenders the zone-level verbs for a ConnectionsZone control. (Overrides ToolZone.RenderVerbs(HtmlTextWriter).)
Protected methodResolveAdapterGets the control adapter responsible for rendering the specified control. (Inherited from Control.)
Public methodResolveClientUrlGets a URL that can be used by the browser. (Inherited from Control.)
Public methodResolveUrlConverts a URL into one that is usable on the requesting client. (Inherited from Control.)
Protected methodSaveControlStateSaves any Web Parts control state changes that occurred since the last time the page was posted back to the server. (Overrides Control.SaveControlState().)
Protected methodSaveViewStateSaves a ConnectionsZone control's view-state changes that occurred since the page was last posted back to the server. (Overrides ToolZone.SaveViewState().)
Protected methodSetDesignModeStateSets design-time data for a control. (Inherited from Control.)
Public methodSetRenderMethodDelegateInfrastructure. Assigns an event handler delegate to render the server control and its content into its parent control. (Inherited from Control.)
Public methodSetTraceData(Object, Object)Sets trace data for design-time tracing of rendering data, using the trace data key and the trace data value. (Inherited from Control.)
Public methodSetTraceData(Object, Object, Object)Sets trace data for design-time tracing of rendering data, using the traced object, the trace data key, and the trace data value. (Inherited from Control.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Protected methodTrackViewStateTracks view-state changes to the ConnectionsZone control so the changes can be stored in the control's StateBag object. (Overrides ToolZone.TrackViewState().)
Top
  NameDescription
Public eventDataBindingOccurs when the server control binds to a data source. (Inherited from Control.)
Public eventDisposedOccurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested. (Inherited from Control.)
Public eventInitOccurs when the server control is initialized, which is the first step in its lifecycle. (Inherited from Control.)
Public eventLoadOccurs when the server control is loaded into the Page object. (Inherited from Control.)
Public eventPreRenderOccurs after the Control object is loaded but prior to rendering. (Inherited from Control.)
Public eventUnloadOccurs when the server control is unloaded from memory. (Inherited from Control.)
Top
  NameDescription
Public Extension MethodFindDataSourceControlReturns the data source that is associated with the data control for the specified control. (Defined by DynamicDataExtensions.)
Public Extension MethodFindFieldTemplateReturns the field template for the specified column in the specified control's naming container. (Defined by DynamicDataExtensions.)
Public Extension MethodFindMetaTableReturns the metatable object for the containing data control. (Defined by DynamicDataExtensions.)
Top
  NameDescription
Explicit interface implemetationPrivate methodIAttributeAccessor.GetAttributeInfrastructure. Gets an attribute of the Web control with the specified name. (Inherited from WebControl.)
Explicit interface implemetationPrivate methodIAttributeAccessor.SetAttributeSets an attribute of the Web control to the specified name and value. (Inherited from WebControl.)
Explicit interface implemetationPrivate methodICompositeControlDesignerAccessor.RecreateChildControlsEnables a designer to recreate the composite control's collection of child controls in the design-time environment. (Inherited from CompositeControl.)
Explicit interface implemetationPrivate propertyIControlBuilderAccessor.ControlBuilderFor a description of this member, see IControlBuilderAccessor.ControlBuilder. (Inherited from Control.)
Explicit interface implemetationPrivate methodIControlDesignerAccessor.GetDesignModeStateFor a description of this member, see IControlDesignerAccessor.GetDesignModeState. (Inherited from Control.)
Explicit interface implemetationPrivate methodIControlDesignerAccessor.SetDesignModeStateFor a description of this member, see IControlDesignerAccessor.SetDesignModeState. (Inherited from Control.)
Explicit interface implemetationPrivate methodIControlDesignerAccessor.SetOwnerControlInfrastructure. For a description of this member, see IControlDesignerAccessor.SetOwnerControl. (Inherited from Control.)
Explicit interface implemetationPrivate propertyIControlDesignerAccessor.UserDataFor a description of this member, see IControlDesignerAccessor.UserData. (Inherited from Control.)
Explicit interface implemetationPrivate propertyIDataBindingsAccessor.DataBindingsFor a description of this member, see IDataBindingsAccessor.DataBindings. (Inherited from Control.)
Explicit interface implemetationPrivate propertyIDataBindingsAccessor.HasDataBindingsFor a description of this member, see IDataBindingsAccessor.HasDataBindings. (Inherited from Control.)
Explicit interface implemetationPrivate propertyIExpressionsAccessor.ExpressionsFor a description of this member, see IExpressionsAccessor.Expressions. (Inherited from Control.)
Explicit interface implemetationPrivate propertyIExpressionsAccessor.HasExpressionsFor a description of this member, see IExpressionsAccessor.HasExpressions. (Inherited from Control.)
Explicit interface implemetationPrivate methodIParserAccessor.AddParsedSubObjectFor a description of this member, see IParserAccessor.AddParsedSubObject. (Inherited from Control.)
Explicit interface implemetationPrivate methodIPostBackEventHandler.RaisePostBackEventInfrastructure. Implements the RaisePostBackEvent method. (Inherited from ToolZone.)
Top

Using the Web Parts control set, you can enable two server controls to form a connection and share data, with one control acting as the provider, and the other acting as the consumer of the data. The two controls can be WebPart controls or any other type of server control, provided that they are designed to handle connections, and that they are residing in a WebPartZoneBase zone. To learn more about Web Parts connections, see the WebPartConnection and ConnectionPoint class overviews, as well as Web Parts Connections Overview.

Provided that the requisite controls and conditions exist to form a Web Parts connection, it is still necessary to actually connect the controls. There are three ways to form a connection between server controls: declaring a connection in a Web page, creating a connection in code, or adding a ConnectionsZone control to the page so that users can connect the controls on demand. The ConnectionsZone control generates a UI that enables users to connect or disconnect any server controls on a page that meet the conditions necessary to form a connection. It is an optional control that is not necessary to form connections, but is useful in the case where you want to give users control over which server controls are connected or disconnected.

The ConnectionsZone control is one of the Web Parts tool zone controls that inherit from the ToolZone base class. As a tool zone, the ConnectionsZone control is designed to be visible only when its Web page is in a certain display mode. In this case, the display mode is named connect mode (a page is in this mode when the WebPartManager control on the page has its DisplayMode property value set to ConnectDisplayMode). After users switch a page into connect mode, they must click a connect verb on the verbs menu of one of the server controls, and then the connection UI becomes visible.

As a Web Parts zone control, the ConnectionsZone control is a type of WebZone zone (which inherits from the CompositeControl class) designed to contain other controls. In general, a ConnectionsZone zone has most of the same elements as other Web Parts tool zones: a header, a body or contents area, and a footer. For a complete discussion of what a Web Parts zone is, and the different parts of a zone, see the WebZone class overview.

Important noteImportant

Unlike most other Web Parts zones, it is important to note that a ConnectionsZone zone does not contain a unique type of server control associated with it. For a list of zones and the associated controls they contain, see the chart in the WebZone class overview. But the ConnectionsZone zone does not contain WebPartConnection controls. Instead, it serves a very limited purpose of providing a UI for users to connect or disconnect server controls that exist in some WebPartZoneBase zone on the page. The only controls contained in a ConnectionsZone control are the standard ASP.NET server controls that it generates as part of its UI for forming connections.

When the ConnectionsZone control is rendered, it generates a UI based on the server controls on the page that are capable of forming connections. The ConnectionsZone control determines which server controls in the WebPartZoneBase zone on the page are providers, which are consumers, which connection points are available, and whether the server controls are currently connected or disconnected, and then it generates the UI accordingly.

For example, suppose there is one WebPart control capable of being a provider, one WebPart control capable of being a consumer, they are declared in a WebPartZone on the page, and they are currently disconnected. When a user switches the page to connect mode and clicks the connect verb on one of the controls, the ConnectionsZone control generates a UI with a link that, when clicked, displays a form in which users can choose options to create a connection. (If the controls were previously connected, the initial view instead presents users with a button to disconnect the controls). In the connection UI for creating new connections, users are shown which control is a provider, and which control is a consumer. A drop-down list control appears below each server control, listing the available ConnectionPoint objects for the control. From the respective drop-down lists, users must select one ProviderConnectionPoint object for the provider (to determine what interface and data will be shared with consumers), and one ConsumerConnectionPoint object for each consumer (to determine what interface and data the consumer will consume) that will be connected to the provider.

NoteNote

In the Web Parts control set default implementation, one provider can connect to many consumers, but a consumer can have only one provider.

To use the ConnectionsZone control, you can declare it within the <form> element on a Web page (but not nested within another Web Parts zone element), using the <asp:connectionszone> element, or you can add it to the page programmatically. If you declare the element in a page, unlike the other Web Parts zones, you cannot declare any other type of server controls between the tags of the <asp:connectionszone> element. You can declare elements within it that relate to its own properties and style details, but it is a standalone element and is not a template control within which other server controls can be declared.

NoteNote

To improve accessibility, the ConnectionsZone control is rendered within a <fieldset> element. The <fieldset> element groups the related set of controls used for establishing connections in the ConnectionsZone control, and it facilitates tabbed navigation among those controls for both visual user agents (such as ordinary Web browsers) and speech-oriented user agents (such as screen-reading software).

The ConnectionsZone control has a number of properties it uses for rendering the connection UI. One set of properties includes several verbs--used only in relation to connections--that carry out actions in the UI: ConfigureVerb, ConnectVerb, and DisconnectVerb. A large set of properties, used especially for the connections zone UI, consists of text strings displayed at various places (or in certain situations, such as when errors occur) in the UI: ConfigureConnectionTitle, ConnectToConsumerInstructionText, ConnectToConsumerText, ConnectToConsumerTitle, ConnectToProviderInstructionText, ConnectToProviderText, ConnectToProviderTitle, ConsumersInstructionText, ConsumersTitle, ExistingConnectionErrorMessage, GetFromText, GetText, InstructionTitle, NewConnectionErrorMessage, NoExistingConnectionInstructionText, NoExistingConnectionTitle, ProvidersInstructionText, ProvidersTitle, SendText, and SendToText. The ConnectionsZone class also contains a number of common properties found in other Web Parts zones: CancelVerb, CloseVerb, Display, EmptyZoneText, HeaderText, InstructionText, and PartChromeType. Finally, the WebPartToConnect property is unique to the class, referencing the control that initiates the connection (this is the control on which the user clicks the connect verb in its verbs menu, which is also the control referenced in the WebPartManager control's SelectedWebPart property).

The ConnectionsZone class also has a number of methods, all of which are inherited and overridden from base classes, and most of them come from the base Web Parts zone classes. For details, see the individual methods.

Notes to Inheritors

The ConnectionsZone class can be extended, if developers want to change its behavior or the default UI that it provides for working with connections.

The following code example demonstrates how to use the ConnectionsZone control on a Web Parts page. The example has four parts:

  • A user control that enables you to switch display modes on the Web page.

  • A source file that contains the code for a ZIP Code interface, and two WebPart controls acting as the provider and the consumer for a connection.

  • A Web page that hosts all the controls, demonstrates how to declare an <asp:connectionszone> element, and sets a number of properties on the connections zone declaratively and programmatically.

  • An explanation of how the example works in a browser.

The first part of this code example is the user control that enables users to switch display modes on a Web page. For details about display modes and a description of the source code in this control, see Walkthrough: Changing Display Modes on a Web Parts Page.

<%@ control language="C#" classname="DisplayModeMenuCS"%>
<script runat="server">

 // Use a field to reference the current WebPartManager.
  WebPartManager _manager;

  void Page_Init(object sender, EventArgs e)
  {
    Page.InitComplete += new EventHandler(InitComplete);
  }  

  void InitComplete(object sender, System.EventArgs e)
  {
    _manager = WebPartManager.GetCurrentWebPartManager(Page);

    String browseModeName = WebPartManager.BrowseDisplayMode.Name;

    // Fill the dropdown with the names of supported display modes.
    foreach (WebPartDisplayMode mode in _manager.SupportedDisplayModes)
    {
      String modeName = mode.Name;
      // Make sure a mode is enabled before adding it.
      if (mode.IsEnabled(_manager))
      {
        ListItem item = new ListItem(modeName, modeName);
        DisplayModeDropdown.Items.Add(item);
      }
    }

    // If shared scope is allowed for this user, display the scope-switching
    // UI and select the appropriate radio button for the current user scope.
    if (_manager.Personalization.CanEnterSharedScope)
    {
      Panel2.Visible = true;
      if (_manager.Personalization.Scope == PersonalizationScope.User)
        RadioButton1.Checked = true;
      else
        RadioButton2.Checked = true;
    }

  }

  // Change the page to the selected display mode.
  void DisplayModeDropdown_SelectedIndexChanged(object sender, EventArgs e)
  {
    String selectedMode = DisplayModeDropdown.SelectedValue;

    WebPartDisplayMode mode = _manager.SupportedDisplayModes[selectedMode];
    if (mode != null)
      _manager.DisplayMode = mode;
  }

  // Set the selected item equal to the current display mode.
  void Page_PreRender(object sender, EventArgs e)
  {
    ListItemCollection items = DisplayModeDropdown.Items;
    int selectedIndex = 
      items.IndexOf(items.FindByText(_manager.DisplayMode.Name));
    DisplayModeDropdown.SelectedIndex = selectedIndex;
  }

  // Reset all of a user's personalization data for the page.
  protected void LinkButton1_Click(object sender, EventArgs e)
  {
    _manager.Personalization.ResetPersonalizationState();
  }

  // If not in User personalization scope, toggle into it.
  protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
  {
    if (_manager.Personalization.Scope == PersonalizationScope.Shared)
      _manager.Personalization.ToggleScope();
  }

  // If not in Shared scope, and if user is allowed, toggle the scope.
  protected void RadioButton2_CheckedChanged(object sender, EventArgs e)
  {
    if (_manager.Personalization.CanEnterSharedScope && 
        _manager.Personalization.Scope == PersonalizationScope.User)
      _manager.Personalization.ToggleScope();
  }
</script>
<div>
  <asp:Panel ID="Panel1" runat="server" 
    Borderwidth="1" 
    Width="230" 
    BackColor="lightgray"
    Font-Names="Verdana, Arial, Sans Serif" >
    <asp:Label ID="Label1" runat="server" 
      Text="&nbsp;Display Mode" 
      Font-Bold="true"
      Font-Size="8"
      Width="120" 
      AssociatedControlID="DisplayModeDropdown"/>
    <asp:DropDownList ID="DisplayModeDropdown" runat="server"  
      AutoPostBack="true" 
      Width="120"
      OnSelectedIndexChanged="DisplayModeDropdown_SelectedIndexChanged" />
    <asp:LinkButton ID="LinkButton1" runat="server"
      Text="Reset User State" 
      ToolTip="Reset the current user's personalization data for the page."
      Font-Size="8" 
      OnClick="LinkButton1_Click" />
    <asp:Panel ID="Panel2" runat="server" 
      GroupingText="Personalization Scope"
      Font-Bold="true"
      Font-Size="8" 
      Visible="false" >
      <asp:RadioButton ID="RadioButton1" runat="server" 
        Text="User" 
        AutoPostBack="true"
        GroupName="Scope" OnCheckedChanged="RadioButton1_CheckedChanged" />
      <asp:RadioButton ID="RadioButton2" runat="server" 
        Text="Shared" 
        AutoPostBack="true"
        GroupName="Scope" 
        OnCheckedChanged="RadioButton2_CheckedChanged" />
    </asp:Panel>
  </asp:Panel>
</div>

The second part of the example is the source file with the interface and custom controls. Notice that the ZipCodeWebPart control implements the IZipCode interface, adding a ConnectionProvider attribute so that the control can act as a provider for a connection. The WeatherWebPart control has a method marked with a ConnectionConsumer attribute, where it consumes the IZipCode interface, so it can act as a consumer in a connection.

For the code example to run, you must compile this source code. You can compile it explicitly and put the resulting assembly in your Web site's Bin folder or the global assembly cache. Alternatively, you can put the source code in your site's App_Code folder, where it will be dynamically compiled at run time. This example uses dynamic compilation. For a walkthrough that demonstrates how to compile, see Walkthrough: Developing and Using a Custom Web Server Control.

namespace Samples.AspNet.CS.Controls
{
  using System;
  using System.Web;
  using System.Web.Security;
  using System.Security.Permissions;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  using System.Web.UI.WebControls.WebParts;

  [AspNetHostingPermission(SecurityAction.Demand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  [AspNetHostingPermission(SecurityAction.InheritanceDemand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  public interface IZipCode
  {
    string ZipCode { get; set;}
  }

  [AspNetHostingPermission(SecurityAction.Demand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  [AspNetHostingPermission(SecurityAction.InheritanceDemand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  public class ZipCodeWebPart : WebPart, IZipCode
  {
    string zipCodeText = String.Empty;
    TextBox input;
    Button send;

    public ZipCodeWebPart()
    {
    }

    // Make the implemented property personalizable to save  
    // the Zip Code between browser sessions.
    [Personalizable()]
    public virtual string ZipCode
    {
      get { return zipCodeText; }
      set { zipCodeText = value; }
    }

    // This is the callback method that returns the provider.
    [ConnectionProvider("Zip Code Provider", "ZipCodeProvider")]
    public IZipCode ProvideIZipCode()
    {
      return this;
    }

    protected override void CreateChildControls()
    {
      Controls.Clear();
      input = new TextBox();
      this.Controls.Add(input);
      send = new Button();
      send.Text = "Enter 5-digit Zip Code";
      send.Click += new EventHandler(this.submit_Click);
      this.Controls.Add(send);
    }

    private void submit_Click(object sender, EventArgs e)
    {
      if (input.Text != String.Empty)
      {
        zipCodeText = Page.Server.HtmlEncode(input.Text);
        input.Text = String.Empty;
      }
    }

  }

  [AspNetHostingPermission(SecurityAction.Demand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  [AspNetHostingPermission(SecurityAction.InheritanceDemand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  public class WeatherWebPart : WebPart
  {
    private IZipCode _provider;
    string _zipSearch;
    Label DisplayContent;

    // This method is identified by the ConnectionConsumer  
    // attribute, and is the mechanism for connecting with  
    // the provider. 
    [ConnectionConsumer("Zip Code Consumer", "ZipCodeConsumer")]
    public void GetIZipCode(IZipCode Provider)
    {
      _provider = Provider;
    }

    protected override void OnPreRender(EventArgs e)
    {
      EnsureChildControls();

      if (this._provider != null)
      {
        _zipSearch = _provider.ZipCode.Trim();
        DisplayContent.Text = "My Zip Code is:  " + _zipSearch;
      }
    }

    protected override void CreateChildControls()
    {
      Controls.Clear();
      DisplayContent = new Label();
      this.Controls.Add(DisplayContent);
    }

  }
}

The third part of the example code is the Web page. Near the top are Register directives for the user control and the custom controls used in the connection. An <asp:connectionszone> element is declared in the page as an example of using the ConnectionsZone control declaratively. Within the element, a number of properties are set declaratively. Other properties on the connections zone are set programmatically in the <script> section of the page.

<%@ Page Language="C#" %>
<%@ register tagprefix="uc1" 
    tagname="DisplayModeMenuCS"
    src="~/displaymodemenucs.ascx" %>
<%@ Register TagPrefix="aspSample" 
    Namespace="Samples.AspNet.CS.Controls" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

  protected void Page_PreRender(object sender, EventArgs e)
  {
     // Set properties on verbs.
     connectionsZone1.CancelVerb.Description = 
       "Terminates the connection process";
     connectionsZone1.CloseVerb.Description = 
       "Closes the connections UI";
     connectionsZone1.ConfigureVerb.Description =
       "Configure the transformer for the connection";
     connectionsZone1.ConnectVerb.Description =
       "Connect two WebPart controls";
     connectionsZone1.DisconnectVerb.Description =
       "End the connection between two controls";

     // Set properties for UI text strings.
     connectionsZone1.ConfigureConnectionTitle = 
       "Configure";
     connectionsZone1.ConnectToConsumerInstructionText = 
       "Choose a consumer connection point";
     connectionsZone1.ConnectToConsumerText = 
       "Select a consumer for the provider to connect with";
     connectionsZone1.ConnectToConsumerTitle = 
       "Send data to this consumer";
     connectionsZone1.ConnectToProviderInstructionText =
       "Choose a provider connection point";
     connectionsZone1.ConnectToProviderText =
       "Select a provider for the consumer to connect with";
     connectionsZone1.ConnectToProviderTitle =
       "Get data from this provider";
     connectionsZone1.ConsumersInstructionText = 
       "WebPart controls that receive data from providers";
     connectionsZone1.ConsumersTitle = "Consumer Controls";
     connectionsZone1.GetFromText = "Receive from";
     connectionsZone1.GetText = "Retrieve";
     connectionsZone1.HeaderText = 
      "Create and Manage Connections";
     connectionsZone1.InstructionText = 
      "Manage connections for the selected WebPart control";
     connectionsZone1.InstructionTitle = 
       "Manage connections for consumers or providers";
     connectionsZone1.NoExistingConnectionInstructionText = 
       "No connections exist. Click the above link to create "
       + "a connection.";
     connectionsZone1.NoExistingConnectionTitle = 
       "No current connections";
     connectionsZone1.ProvidersInstructionText =
       "WebPart controls that send data to consumers";
     connectionsZone1.ProvidersTitle = "Provider controls";

  }
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Connection Zone Sample</title>
</head>
<body>
  <form id="form1" runat="server">
  <asp:webpartmanager runat="server" id="mgr">
    <staticconnections>
      <asp:webpartconnection id="connection1" 
        consumerconnectionpointid="ZipCodeConsumer"
        consumerid="zipConsumer"
        providerconnectionpointid="ZipCodeProvider" 
        providerid="zipProvider" />
    </staticconnections>
  </asp:webpartmanager>
  <uc1:displaymodemenucs id="menu1" runat="server" />
  <div>
  <asp:webpartzone id="WebPartZone1" runat="server">
    <zonetemplate>
      <aspsample:zipcodewebpart id="zipProvider" runat="server" 
        Title="Zip Code Provider"  />
      <aspsample:weatherwebpart id="zipConsumer" runat="server" 
        Title="Zip Code Consumer" />
    </zonetemplate>
  </asp:webpartzone>
  <asp:connectionszone id="connectionsZone1" runat="server" >
    <cancelverb text="Terminate" />
    <closeverb text="Close Zone" />
    <configureverb text="Configure" />
    <connectverb text="Connect Controls" />
    <disconnectverb text="End Connection" />
  </asp:connectionszone>
  </div>
  </form>
</body>
</html>

Load the Web page in a browser. Use the Display Mode drop-down list control to switch the page to connect mode. On the verbs menu of the ZIP Code Provider control (the verbs menu is indicated by the downward arrow in the control's title bar), click the connect verb. A ConnectionsZone control appears. Note that in the connection UI, an End Connection button appears; the connection has already been declared in the markup of the page, so the controls are already connected. Click End Connection, and then use the Display Mode control again to return the page to browse mode. Next, return the page to connect mode again, click the connect verb on one of the controls, and note that the connection UI now displays a hyperlink that enables you to form a connection between the controls. Click the link, and use the connection UI to select connection points and establish the connection.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.