HttpResponse.RedirectLocation Propriedade

Definição

Obtém ou define o valor do cabeçalho HTTP Location .

public:
 property System::String ^ RedirectLocation { System::String ^ get(); void set(System::String ^ value); };
public string RedirectLocation { get; set; }
member this.RedirectLocation : string with get, set
Public Property RedirectLocation As String

Valor da propriedade

O URI absoluto que é transmitido para o cliente no cabeçalho HTTP Location .

Exceções

Os cabeçalhos HTTP já foram gravados.

Exemplos

O exemplo a seguir mostra como usar essa propriedade para especificar a URL de redirecionamento ao codificar um redirecionamento permanente usando o código de resposta HTTP 301.

Response.StatusCode = 301;
Response.Status = "301 Moved Permanently";
Response.RedirectLocation = "http://www.newurl.com ";
Response.End();

Aplica-se a