473,325 Members | 2,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Show current web address in Label or textbox

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
4 1883
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: aaj | last post by:
Hi all I have a small but rather annoying problem with continuos forms, and am wondering if anyone can suggest a method of getting over it. The front end is Access 2002 with the BE being SQL...
1
by: Josema | last post by:
Hi to all, I have a textbox and a button... When the button its clicked i show a label that has the text "Hello World"... I would like to make that, when the button its clicked, first show an...
3
by: Wang | last post by:
Here is the code for a webcontrol, quite simple: ------------------------------------------------------------------------------------------------------------- <%@ Control Language="c#"...
9
by: Martin Ho | last post by:
My application should check for new updates when user chooses this option in the menu. It should go online and check the flag and compare with current flag in the programs directory. If version is...
0
by: CharlesA | last post by:
Hi folks, I'm using ASP.net 1.1 with C# I've got this kind of thing going <div class="row"> <label class="col1">Rm Name</label> <asp:textbox id="txtRM" runat="server" cssclass="col2"...
2
by: aarepasky | last post by:
I am using ASP Web 2005 express and I have a textbox in a user control. Now when I try to use it in another user control, I get the error that it "does not exist in current context. These 2 user...
2
by: suzi167 | last post by:
Hello Everyone, I am having the following issue. I have an AJAX enabled Web Application in C#. I am using a Master Page and then I have a Default.aspx page which is based on the Master page....
2
by: Ken | last post by:
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...
11
by: dmorand | last post by:
I'm having some trouble with my javascript which is supposed to hide/show a div element. I have to click on the link twice before it'll hide. I can't seem to figure out why the first click does...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.