This documentation is archived and is not being maintained.

ConnectionsZone::ConnectToProviderText Property

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

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

public:
virtual property String^ ConnectToProviderText {
	String^ get ();
	void set (String^ value);
}
<asp:ConnectionsZone ConnectToProviderText="String" />

Property Value

Type: System::String
A string displayed as the text of a hyperlink that opens the view where users select providers. The default text is a culture-specific string supplied by the .NET Framework.

The ConnectToProviderText property takes effect in a specific connection scenario. When a user clicks the connect verb on a consumer control, and no connection exists, the ConnectionsZone control displays a hyperlink with the text Select a provider for the consumer to connect with. When users click the hyperlink, it opens a view in which they can select an available provider to connect with the consumer.

You can set this property declaratively, by using the ConnectToProviderText 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 ConnectToProviderText 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 ConnectToProviderText property.

No code example is currently available or this language may not be supported.

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 notice that the hyperlink appears with the custom text assigned to the ConnectToProviderText 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
Show: