HttpResponse.RedirectLocation Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
HTTP Location üst bilgisinin değerini alır veya ayarlar.
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
Özellik Değeri
HTTP Location üst bilgisinde istemciye iletilen mutlak URI.
Özel durumlar
HTTP üst bilgileri zaten yazılmıştır.
Örnekler
Aşağıdaki örnekte, HTTP 301 yanıt kodunu kullanarak kalıcı bir yeniden yönlendirme kodladığınızda yeniden yönlendirme URL'sini belirtmek için bu özelliğin nasıl kullanılacağı gösterilmektedir.
Response.StatusCode = 301;
Response.Status = "301 Moved Permanently";
Response.RedirectLocation = "http://www.newurl.com ";
Response.End();