473,698 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

getting the url of a webpage

hi!
i'm designing a web application,bas ically it have two
pages,"client_b rowser.apsx" & "adserver.aspx" ."client_browse r.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.Cur rent.Request.Ur lReferrer;

Apr 16 '07 #1
4 5079
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*******@gmai l.comwrote in message
news:11******** **************@ w1g2000hsg.goog legroups.com...
hi!
i'm designing a web application,bas ically it have two
pages,"client_b rowser.apsx" & "adserver.aspx" ."client_browse r.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.Cur rent.Request.Ur lReferrer;

Apr 16 '07 #2
On Apr 16, 1:12 pm, "Eliyahu Goldin"
<REMOVEALLCAPIT ALSeEgGoldD...@ mMvVpPsS.orgwro te:
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...@gmai l.comwrote in message

news:11******** **************@ w1g2000hsg.goog legroups.com...
hi!
i'm designing a web application,bas ically it have two
pages,"client_b rowser.apsx" & "adserver.aspx" ."client_browse r.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.Cur rent.Request.Ur lReferrer;- 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.getEle mentById("inhUr l").value=my Url

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*******@gmai l.comwrote in message
news:11******** **************@ o5g2000hsb.goog legroups.com...
On Apr 16, 1:12 pm, "Eliyahu Goldin"
<REMOVEALLCAPIT ALSeEgGoldD...@ mMvVpPsS.orgwro te:
>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...@gmai l.comwrote in message

news:11******* *************** @w1g2000hsg.goo glegroups.com.. .
hi!
i'm designing a web application,bas ically it have two
pages,"client_b rowser.apsx" & "adserver.aspx" ."client_browse r.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.Cur rent.Request.Ur lReferrer;- 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"
<REMOVEALLCAPIT ALSeEgGoldD...@ mMvVpPsS.orgwro te:
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.getEle mentById("inhUr l").value=my Url

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...@gmai l.comwrote in message

news:11******** **************@ o5g2000hsb.goog legroups.com...
On Apr 16, 1:12 pm, "Eliyahu Goldin"
<REMOVEALLCAPIT ALSeEgGoldD...@ mMvVpPsS.orgwro te:
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...@gmai l.comwrote in message
>news:11******* *************** @w1g2000hsg.goo glegroups.com.. .
hi!
i'm designing a web application,bas ically it have two
pages,"client_b rowser.apsx" & "adserver.aspx" ."client_browse r.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.Cur rent.Request.Ur lReferrer;- 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
2645
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 Anyway, this and also this tutorial here: http://www.devshed.com/c/a/Python/MySQL-Connectivity-With-Python/2/
12
2704
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. Is there an easy way to interface the program to do this? I have two questions: How can I call a webpage as simply as possible in c / c++ (preferably not using MFC etc) and pass a 'post' string to the page? How can I retrieve an array of values...
3
2785
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 like: webpage.htm?Param1=... and I will take the passed params and post them to another page. I have the post part working, but I was just wondering how I can use just Javascript and read those values passed to this webpage. Is this even possible?
9
1521
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 following connection in the web.config file <add name="NorthwindConnectionString1" connectionString="Data Source=VHAV16PLAN1;Initial Catalog=Northwind;Integrated Security=SSPI" providerName="System.Data.SqlClient" /> Have following added to...
2
1368
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: parse error, unexpected $ in /home/coyote/public_html/forums/ips_kernel/class_converge.php on line 165 The official webpage for this forum wont come up either...it says page cannot be displayed.... is this just a problem with the website or my...
2
3572
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 uby/Rails. I started it in Perl and gave up on Perl as I went from the 'display the database information on the web page' to the 're-display the information from the database and allow the user to update the database using the web page' stage and realized...
1
4562
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 webpage (.asp),in same environment, it is working fine. Any one please help me regarding this issue.
5
2262
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> <div> <input type="text" name="b" /> </div>
2
1278
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 out put ARRAY the browser is supposed to get two posted values from previous webpage(3rd party website)
6
1400
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, objConnection) objCommand.Fill(dsDataSet, "view") This worked fine until the DBA messed up the view. Then my page got an error when it tried to do the fill. I need a way for my webpage to detect if the view is good or bad before getting an error...
0
8672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8890
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8858
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3038
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2322
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.