Show current web address in Label or textbox

  • Thread starter Thread starter Ken
  • Start date Start date
K

Ken

Is there any way to show current webpage in Label or textbox?

for example, if the page address I browse currently is
http://localhost/try/default.aspx then I want to show the information about
current address in Label or Textbox on current page (in this case, the
default.aspx).
 
Hi,.

you get information about request (also the requested Url) via Request
object

For example:

Label1.Text = System.IO.Path.GetFileName(Request.FilePath)
 
well,
I need Whole address including "Http"
the reason of this is to check the if the page is "Http" or "Https"

Thanks
 
Use Request.Url.ToString



Juan
====
Ken said:
well,
I need Whole address including "Http"
the reason of this is to check the if the page is "Http" or "Https"

Thanks
 
Back
Top