This documentation is archived and is not being maintained.

ConnectionsZone.ConnectToProviderTitle Property

Gets 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.

Namespace:  System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)

public virtual string ConnectToProviderTitle { get; set; }
<asp:ConnectionsZone ConnectToProviderTitle="String" />

Property Value

Type: System.String
A string serving as the title of the section where users select providers. The default title is a culture-specific string supplied by the .NET Framework.

The ConnectToProviderTitle property takes effect in a specific connection scenario. When users click the connect verb on a consumer control, and no connection exists, they eventually arrive at a view in which they can select a provider to connect with the previously selected consumer. The title of this view is supplied by the ConnectToProviderTitle property.

You can set this property declaratively, by using the ConnectToProviderTitle attribute in the opening tag of the <asp:connectionszone> element in a page, or you can set the property programmatically.

The following code example demonstrates the use of the ConnectToProviderTitle property with a ConnectionsZone control. The example contains only the code for the Web page that demonstrates use of the property; for the other two code files needed to run the example, see the Example section of the ConnectionsZone class overview. The code example has four parts:

  • A user control that enables you to switch display modes on the Web page. Obtain this code from the ConnectionsZone class overview.

  • 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. Obtain this code from the ConnectionsZone class overview.

  • A Web page that hosts all the controls, declares an <asp:connectionszone> element, and shows how to use the property programmatically.

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

The Web page declares an <asp:connectionszone> element and, in the Page_PreRender method, the code assigns a value to the ConnectToProviderTitle property.

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  

<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 = 
     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";


<html xmlns="" >
<head runat="server">
    <title>Connection Zone Sample</title>
  <form id="form1" runat="server">
  <asp:webpartmanager runat="server" id="mgr">
      <asp:webpartconnection id="connection1" 
        providerid="zipProvider" />
  <uc1:displaymodemenucs id="menu1" runat="server" />
  <asp:webpartzone id="WebPartZone1" runat="server">
      <aspsample:zipcodewebpart id="zipProvider" runat="server" 
        Title="Zip Code Provider"  />
      <aspsample:weatherwebpart id="zipConsumer" runat="server" 
        Title="Zip Code Consumer" />
  <asp:connectionszone id="connectionsZone1" runat="server" >
    <cancelverb text="Terminate" />
    <closeverb text="Close Zone" />
    <configureverb text="Configure" />
    <connectverb text="Connect Controls" />
    <disconnectverb text="End Connection" />

Load the page in a browser. Switch to connect mode, using the Display Mode control. Click the verbs menu arrow on the ZIP Code Consumer control, and click the connect verb. Click the End Connection button to end the connection, and then click the link to select a provider. In the view for selecting a provider, note that the title text of the section is the text that the code assigns to the ConnectToProviderTitle property.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

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

.NET Framework

Supported in: 3.5, 3.0, 2.0