473,320 Members | 2,146 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,320 software developers and data experts.

getting the url of a webpage

hi!
i'm designing a web application,basically it have two
pages,"client_browser.apsx" & "adserver.aspx"."client_browser.aspx"
contains an iframe,and in the iframe i have displayed my
"adserver.aspx".now i want to get the URL path of the client browser
on my "adserver.aspx".but the code i have used returns me the URL
path of "adserver.aspx",as it is behind the adserver.aspx.i want to
get the URL path of the any client page displaying my server page
through iframe.any one having idea about it plz guide me.
i'm using asp.NET,C# for implementation:
the code i have used is following:

Uri vpath = HttpContext.Current.Request.UrlReferrer;

Apr 16 '07 #1
4 5059
On server side there is no way how a page in an iframe can know anything
about the parent.

On client side the page in the iframe can use window.parent property to get
to the containing window and get the url of the document loaded into the
containing window as parent.location.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"bushi" <bu*******@gmail.comwrote in message
news:11**********************@w1g2000hsg.googlegro ups.com...
hi!
i'm designing a web application,basically it have two
pages,"client_browser.apsx" & "adserver.aspx"."client_browser.aspx"
contains an iframe,and in the iframe i have displayed my
"adserver.aspx".now i want to get the URL path of the client browser
on my "adserver.aspx".but the code i have used returns me the URL
path of "adserver.aspx",as it is behind the adserver.aspx.i want to
get the URL path of the any client page displaying my server page
through iframe.any one having idea about it plz guide me.
i'm using asp.NET,C# for implementation:
the code i have used is following:

Uri vpath = HttpContext.Current.Request.UrlReferrer;

Apr 16 '07 #2
On Apr 16, 1:12 pm, "Eliyahu Goldin"
<REMOVEALLCAPITALSeEgGoldD...@mMvVpPsS.orgwrote:
On server side there is no way how a page in an iframe can know anything
about the parent.

On client side the page in the iframe can use window.parent property to get
to the containing window and get the url of the document loaded into the
containing window as parent.location.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldinhttp://usableasp.net

"bushi" <bushra...@gmail.comwrote in message

news:11**********************@w1g2000hsg.googlegro ups.com...
hi!
i'm designing a web application,basically it have two
pages,"client_browser.apsx" & "adserver.aspx"."client_browser.aspx"
contains an iframe,and in the iframe i have displayed my
"adserver.aspx".now i want to get the URL path of the client browser
on my "adserver.aspx".but the code i have used returns me the URL
path of "adserver.aspx",as it is behind the adserver.aspx.i want to
get the URL path of the any client page displaying my server page
through iframe.any one having idea about it plz guide me.
i'm using asp.NET,C# for implementation:
the code i have used is following:
Uri vpath = HttpContext.Current.Request.UrlReferrer;- Hide quoted text -

- Show quoted text -
thanks Goldin!!!
it helps me,but its available within javascript,i want
to get it in the code behind file.how i can access it in the aspx.cs
file,i have used a hidden field to store its value.but when i
retreived it in the code behind file,its returning me the null
value.can i use this java script in my aspx.cs file?if yes then how?

Apr 16 '07 #3
Passing the url up to the server in a hidden input field is the correct
idea. You just need to get it work.

Declare the field as
<input type=hidden runat=server id=inhUrl />

Pass the url there in javascript as
document.getElementById("inhUrl").value=myUrl

and access the value on server side as
inhUrl.Value

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"bushi" <bu*******@gmail.comwrote in message
news:11**********************@o5g2000hsb.googlegro ups.com...
On Apr 16, 1:12 pm, "Eliyahu Goldin"
<REMOVEALLCAPITALSeEgGoldD...@mMvVpPsS.orgwrote:
>On server side there is no way how a page in an iframe can know anything
about the parent.

On client side the page in the iframe can use window.parent property to
get
to the containing window and get the url of the document loaded into the
containing window as parent.location.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP
[ASP.NET]http://msmvps.com/blogs/egoldinhttp://usableasp.net

"bushi" <bushra...@gmail.comwrote in message

news:11**********************@w1g2000hsg.googlegr oups.com...
hi!
i'm designing a web application,basically it have two
pages,"client_browser.apsx" & "adserver.aspx"."client_browser.aspx"
contains an iframe,and in the iframe i have displayed my
"adserver.aspx".now i want to get the URL path of the client browser
on my "adserver.aspx".but the code i have used returns me the URL
path of "adserver.aspx",as it is behind the adserver.aspx.i want to
get the URL path of the any client page displaying my server page
through iframe.any one having idea about it plz guide me.
i'm using asp.NET,C# for implementation:
the code i have used is following:
Uri vpath = HttpContext.Current.Request.UrlReferrer;- Hide quoted
text -

- Show quoted text -

thanks Goldin!!!
it helps me,but its available within javascript,i want
to get it in the code behind file.how i can access it in the aspx.cs
file,i have used a hidden field to store its value.but when i
retreived it in the code behind file,its returning me the null
value.can i use this java script in my aspx.cs file?if yes then how?

Apr 16 '07 #4
On Apr 16, 5:32 pm, "Eliyahu Goldin"
<REMOVEALLCAPITALSeEgGoldD...@mMvVpPsS.orgwrote:
Passing the url up to the server in a hidden input field is the correct
idea. You just need to get it work.

Declare the field as
<input type=hidden runat=server id=inhUrl />

Pass the url there in javascript as
document.getElementById("inhUrl").value=myUrl

and access the value on server side as
inhUrl.Value

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldinhttp://usableasp.net

"bushi" <bushra...@gmail.comwrote in message

news:11**********************@o5g2000hsb.googlegro ups.com...
On Apr 16, 1:12 pm, "Eliyahu Goldin"
<REMOVEALLCAPITALSeEgGoldD...@mMvVpPsS.orgwrote:
On server side there is no way how a page in an iframe can know anything
about the parent.
On client side the page in the iframe can use window.parent property to
get
to the containing window and get the url of the document loaded into the
containing window as parent.location.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP
[ASP.NET]http://msmvps.com/blogs/egoldinhttp://usableasp.net
"bushi" <bushra...@gmail.comwrote in message
>news:11**********************@w1g2000hsg.googlegr oups.com...
hi!
i'm designing a web application,basically it have two
pages,"client_browser.apsx" & "adserver.aspx"."client_browser.aspx"
contains an iframe,and in the iframe i have displayed my
"adserver.aspx".now i want to get the URL path of the client browser
on my "adserver.aspx".but the code i have used returns me the URL
path of "adserver.aspx",as it is behind the adserver.aspx.i want to
get the URL path of the any client page displaying my server page
through iframe.any one having idea about it plz guide me.
i'm using asp.NET,C# for implementation:
the code i have used is following:
Uri vpath = HttpContext.Current.Request.UrlReferrer;- Hide quoted
text -
- Show quoted text -
thanks Goldin!!!
it helps me,but its available within javascript,i want
to get it in the code behind file.how i can access it in the aspx.cs
file,i have used a hidden field to store its value.but when i
retreived it in the code behind file,its returning me the null
value.can i use this java script in my aspx.cs file?if yes then how?- Hide quoted text -

- Show quoted text -
thanx Goldin!!!
i have done it in the same way.its working.............

Apr 17 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Robert Ferber | last post by:
Hi, I can't find any good documentation about the Python-database module, all I found was this rudimentary (no examples, no references) piece here: http://www.python.org/peps/pep-0249.html ...
12
by: David Walker | last post by:
Hi I have a program which I need to interface with a webpage - the webpage will accept an input (probably a 'post' string from the program) and then will process it and needs to return a value. ...
3
by: Matt | last post by:
Hello, I am pretty rusty with javascript and I am trying to make a webpage that will basically act as a wrapper from one webpage to another. What I mean by this is that I will hit this page...
9
by: =?Utf-8?B?UmF5?= | last post by:
Have SQL server on one machine. Have IIS on another machine in same large intranet. Have website in IIS with Basic Authentication turned on and other options deselected. Have webpage (.aspx) with...
2
by: Sianaba | last post by:
I am getting help from a website to fix my malware etc problem.... i was instructed to run a Kaspersky scan and now when i try to get to my specific forum i get this come up instead: Parse error:...
2
by: rustyc | last post by:
Well, here's my first post in this forum (other than saying 'HI' over in the hi forum ;-) As I said over there: ... for a little side project at home, I'm writing a ham radio web site in...
1
by: GGiri | last post by:
Hi, I am trying to post( using httppost) from java application to .NET webpage (.aspx) which is Configured in IIS 5.1, getting the response as error code 500, But i am posting to asp...
5
by: yawnmoth | last post by:
I'm trying to get a list of all the input elements of a form tag and am having some difficulty doing so. First, here's my XHTML: <div> <form action=""> <input type="text" name="a" /> </div>...
2
by: creative1 | last post by:
hi there, I one question about getting , is this possible that a webpage could not get POSTed values? if yes what should be done to fix that? If I try: echo ($HTTP_POST_VARS); I get following...
6
denny1824
by: denny1824 | last post by:
On the webpage I use a view to fill a dataset. strCommand = "Select * from view" objConnection = New SqlClient.SqlConnection(strconnect) objCommand = New SqlClient.SqlDataAdapter(strCommand,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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: 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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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.