By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,034 Members | 1,714 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,034 IT Pros & Developers. It's quick & easy.

Show current web address in Label or textbox

P: n/a
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).

May 3 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi,.

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

For example:

Label1.Text = System.IO.Path.GetFileName(Request.FilePath)

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

"Ken" <kl**@jeromegroup.comwrote in message
news:e$*************@TK2MSFTNGP06.phx.gbl...
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).
May 3 '07 #2

P: n/a
Ken
well,
I need Whole address including "Http"
the reason of this is to check the if the page is "Http" or "Https"

Thanks

"Teemu Keiski" <jo****@aspalliance.comwrote in message
news:C3**********************************@microsof t.com...
Hi,.

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

For example:

Label1.Text = System.IO.Path.GetFileName(Request.FilePath)

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

"Ken" <kl**@jeromegroup.comwrote in message
news:e$*************@TK2MSFTNGP06.phx.gbl...
>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).

May 3 '07 #3

P: n/a
Use Request.Url.ToString

Juan
====
"Ken" <kl**@jeromegroup.comescribió en el mensaje news:OD**************@TK2MSFTNGP04.phx.gbl...
well,
I need Whole address including "Http"
the reason of this is to check the if the page is "Http" or "Https"

Thanks

"Teemu Keiski" <jo****@aspalliance.comwrote in message
news:C3**********************************@microsof t.com...
>Hi,.

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

For example:

Label1.Text = System.IO.Path.GetFileName(Request.FilePath)

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

"Ken" <kl**@jeromegroup.comwrote in message news:e$*************@TK2MSFTNGP06.phx.gbl...
>>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).


May 3 '07 #4

P: n/a
Ken
That is simple and works
Thanks

"Juan T. Llibre" <no****@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Use Request.Url.ToString

Juan
====
"Ken" <kl**@jeromegroup.comescribió en el mensaje
news:OD**************@TK2MSFTNGP04.phx.gbl...
>well,
I need Whole address including "Http"
the reason of this is to check the if the page is "Http" or "Https"

Thanks

"Teemu Keiski" <jo****@aspalliance.comwrote in message
news:C3**********************************@microso ft.com...
>>Hi,.

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

For example:

Label1.Text = System.IO.Path.GetFileName(Request.FilePath)

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

"Ken" <kl**@jeromegroup.comwrote in message
news:e$*************@TK2MSFTNGP06.phx.gbl...
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).




May 3 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.