Partager via


Uri.PathAndQuery Propriété

Définition

Obtient les propriétés et Query les AbsolutePath propriétés séparées par un point d’interrogation ( ?).

public:
 property System::String ^ PathAndQuery { System::String ^ get(); };
public string PathAndQuery { get; }
member this.PathAndQuery : string
Public ReadOnly Property PathAndQuery As String

Valeur de propriété

Query Propriétés AbsolutePath séparées par un point d’interrogation ( ?).

Exceptions

Cette instance représente un URI relatif et cette propriété est valide uniquement pour les URI absolus.

Exemples

L’exemple suivant écrit les informations de chemin d’URI (/catalog/shownew.htm) et de requête (?date=today) dans la console.

Uri baseUri = new Uri("http://www.contoso.com/");
Uri myUri = new Uri(baseUri, "catalog/shownew.htm?date=today");

Console.WriteLine(myUri.PathAndQuery);
let baseUri = Uri "http://www.contoso.com/"
let myUri = Uri(baseUri, "catalog/shownew.htm?date=today")

printfn $"{myUri.PathAndQuery}"
Dim baseUri As New Uri("http://www.contoso.com/")
Dim myUri As New Uri(baseUri, "catalog/shownew.htm?date=today")
       
Console.WriteLine(myUri.PathAndQuery)

Remarques

La PathAndQuery propriété contient le chemin absolu sur le serveur et les informations de requête envoyées avec la requête. Il est identique à la concaténation des propriétés et Query des AbsolutePath propriétés.

La PathAndQuery propriété est échappée selon RFC 2396 par défaut. Si l’analyse IDN (International Resource Identifiers) ou Internationalized Domain Name (IDN) est activée, la PathAndQuery propriété est échappée selon RFC 3986 et RFC 3987.

Pour plus d’informations sur la prise en charge de l’IRI, consultez la section Notes pour la Uri classe.

S’applique à