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

Retrieving the redirected URL

Hi there, is it possible to retrieve the URL of a webpage which a user has been redirected to using some tags in ASP?

I'm building a site where the user is redirected to an external webpage when they select a button. This external page is almost always different each time.

I have been able to embed a redirect using:

<form method="POST" action="http://dx.doi.org" runat="server">
<input type="submit"/>

but I don't know how I could code some sort of a method="GET" using a dynamic URL.
Mar 9 '10 #1
8 2649
RedSon
5,000 Expert 4TB
don't you have some kind of get method and in that can't you add some kind of response.redirect(url)?
Mar 9 '10 #2
Yes, but that takes you to a "known" url.
I want to find a way to retrieve a url which is unknown until a user is redirected to it. Anyway, after talking about this with my supervisor, it seems that this is possible with an
Expand|Select|Wrap|Line Numbers
  1. <a href= "" >
tag, but I'm not so sure as according to:

http://www.w3schools.com/HTML/html_links.asp

this tag is a hyperlink.
Mar 10 '10 #3
RedSon
5,000 Expert 4TB
How can you redirect a user to an unknown URL that is not known until the user is redirected to it? Do you not see the circular logic in that?
Mar 10 '10 #4
I don't want to "re-direct" them to an unknown URL, I want to be able to retrieve the url of a site they have been moved to. Here's the plan?

1. Enter information into text box.
2. Click on submit button.
3. Retrieve the resulting url that a user would have been redirected to if they had used the DOI website http://dx.doi.org/
4. Do stuff with the URL retrieved from step 2 e.g. read text, look for strings, look for pictures, etc.

I don't know if this is possible with html and/or C#.
I am developing the site in C#
Mar 10 '10 #5
RedSon
5,000 Expert 4TB
You are writing a web proxy? When someone enters in whatever a "doi" is you want to navigate to that site and download it?

Also, as a side note, you realise that doi is an alternate spelling of the word "doy" (http://www.urbandictionary.com/define.php?term=doy)
Mar 11 '10 #6
No I'm not redirecting to a web proxy or downloading the doi, just screen scraping the site that it redirects to, which is unknown until the user redirects to it.
Mar 11 '10 #7
jhardman
3,406 Expert 2GB
the standard method is to redirect to a page within your website first, track where they are going, then send them on their way. Does this make sense?

Jared
Mar 11 '10 #8
GazMathias
228 Expert 128KB
A couple of ideas. Not sure exactly how the dynamics of what you want to do work, but:

Use the microsoft.xmlhttp object to return the results page of the doi lookup and parse (if the page isn't automatically redirected by the lookup), then redirect them yourself.

Open the doi page in a frame, use javascript to grab the url of the page they get redirected to within the frame.

May be grasping at straws a bit there.

Gaz,
Mar 12 '10 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Miko | last post by:
how does one determine a redirected url? for example: http://tinyurl.com/3apbd is redirected to: http://www.cbsnews.com/stories/2004/03/18/sunday/main607191.shtml
4
by: Oz | last post by:
This is long. Bear with me, as I will really go through all the convoluted stuff that shows there is a problem with streams (at least when used to redirect stdout). The basic idea is that my...
3
by: George B | last post by:
When I redirect standard output, I would like to duplicate a few lines of this output to the console. If I add duplicates of the desired source statements, changing cout to cerr, it works fine,...
3
by: Vikrant | last post by:
Friends, Due an application (old) install program problem, Under AIX I could only create DB2 instance, I could also catalog it. Its complex application and I am not expert in creating full...
1
by: Jack | last post by:
Is it possible to find out what the tablespace definitions are of database you are about to build using a redirected restore? What I am wanting to do is build a script that can take only a backup...
7
by: CCC via DBMonster.com | last post by:
We use redirected restore to refresh test from prod on different AIX 5.2 servers. The databases have the same number, size and names of cooked containers. The only difference is the fully qualified...
1
by: Kent.Brooke | last post by:
When a backup is taken from server a and then redirected restore is done on server b, the tables and data is fine however db2advis says "explain & advise tables not created for user x properly"....
2
by: B. Hummer | last post by:
My corporate environment uses redirected profiles for Application Settings, My Documents and Desktop. I've already gotten through the fact that to run my apps "trusted" that I need to have the...
0
by: Matt | last post by:
Hello all, We are using Forms Authentication in an application to protect both sensitive ASP.Net pages and Web services. This question is relating to Web services and forms authentication,...
0
blossam
by: blossam | last post by:
hi friends, i have large no of url list now i want to check all url one by one for checking that the url is redirected or not. If the url or domain is redirected than i want to print msg that it...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.