Share via


Connection.Url Property

Definition

Gets the Uniform Resource Identifier (URI) for the current connection.

public:
 property Uri ^ Url { Uri ^ get(); };
public Uri Url { get; }
member this.Url : Uri
Public ReadOnly Property Url As Uri

Property Value

Uri

The Uri object that is associated with the current connection.

Examples

public LinkedList<string> getURL(IServiceProvider sp) {

    Connection con = (Connection)sp.GetService(typeof(Connection));
    LinkedList<string> llp = new LinkedList<string>();

    llp.AddLast("Url.AbsolutePath : " + con.Url.AbsolutePath);
    llp.AddLast("Url.AbsoluteUri : " + con.Url.AbsoluteUri);
    llp.AddLast("Url.Authority : " + con.Url.Authority);
    llp.AddLast("Url.DnsSafeHost : " + con.Url.DnsSafeHost);
    llp.AddLast("Url.Fragment : " + con.Url.Fragment);
    llp.AddLast("Url.Host : " + con.Url.Host);
    llp.AddLast("Url.HostNameType : " + con.Url.HostNameType.ToString());
    llp.AddLast("Url.UserInfo : " + con.Url.UserInfo);
    llp.AddLast("Url.Scheme : " + con.Url.Scheme);
    llp.AddLast("Url.OriginalString : " + con.Url.OriginalString);
    llp.AddLast("Url.PathAndQuery : " + con.Url.PathAndQuery);
    llp.AddLast("Url.Port : " + con.Url.Port.ToString());

    return llp;
}

Applies to