Ne arayalım?

ARAMIZA KATILIN

BİZE ULAŞIN

Adres:

E-posta:

host/bin/bilisimlife.dll

iletisim@bilisimlife.net




 
Rserit
Developer
       
 1026  
 278

ASP.NET Request URL Kullanımları

Selamlar,
ASP.NET'te Request.Url'nin birçok kullanımı ve değeri var. Bunları şöyle sıralamak gerekirse:


Örnek URL: http://localhost:12345/site/page.aspx?q1=1&q2=2

Url.Host: HttpContext.Current.Request.Url.Host
Çıktı: localhost

Url.Authority:
HttpContext.Current.Request.Url.Authority
Çıktı: localhost:12345

Url.AbsolutePath:
HttpContext.Current.Request.Url.AbsolutePath
Çıktı: /site/page.aspx

ApplicationPath: HttpContext.Current.Request.ApplicationPath
Çıktı: /site

Url.AbsoluteUri:
HttpContext.Current.Request.Url.AbsoluteUri
Çıktı: http://localhost:12345/site/page.aspx?q1=1&q2=2

RawUrl: HttpContext.Current.Request.RawUrl
Çıktı: /site/page.aspx?q1=1&q2=2

Url.PathAndQuery: HttpContext.Current.Request.Url.PathAndQuery
Çıktı: /site/page.aspx?q1=1&q2=2

İyi çalışmalar,
Recep.

Developer.