473,386 Members | 1,819 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,386 software developers and data experts.

how to get target of a redirect

BeemerBiker
I did spend some time googleing this but all I got was how to do the redirect.

The url xxxx redirects to yyyy just fine.

How do I get the value of the yyyy so I can access it directly and modify it.

Expand|Select|Wrap|Line Numbers
  1.         private string GetHTML(string url)
  2.         {
  3.             StringBuilder sb = new StringBuilder();
  4.             byte[] buf = new byte[8192]; //[1048576];
  5.             HttpWebRequest request;
  6.             HttpWebResponse response;
  7.             Stream resStream;
  8.             try
  9.             {
  10.                 request = (HttpWebRequest)WebRequest.Create(url);
  11.                 request.AllowAutoRedirect = true;
  12.                 response = (HttpWebResponse)request.GetResponse();
  13.                 resStream = response.GetResponseStream();
  14.             }
  15.             catch (Exception eee)
  16.             {
  17.                 MessageBox.Show(eee.Message.ToString() + ":" + url);
  18.                 return "";
  19.             }
The above code works for
http://climateprediction.net/show_us...?userid=531866

but it fails for
http://climateprediction.net/list_us...?userid=531866

If I can change climateprediction.net into "climateapps2.oucs.ox.ac.uk/cpdnboinc" then it would work.
Aug 22 '09 #1
0 1337

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

Similar topics

3
by: Phil Powell | last post by:
header("Location: http://$SERVER_NAME/index.php; Window-target: top""); I am getting a 403 Forbidden upon running this script, which is not what I wanted. Is there a way I can redirect, but at...
1
by: Cantekin Guneser | last post by:
in my project i am using framesets, at the left frame set notmally i am using hiperlink element with target to redirect main frame this is ordinary, but now i need to redirect main frame with...
5
by: MB | last post by:
Hello! I am using a frameset and vb codebehind to work with a database. When pressing a delete button in one of my frames, I want the hole application to be refreshed, or at least another of my...
8
by: msnews.microsoft.com | last post by:
I want to redirect the user to a url outside of our website but I want it to preserve our application's window by opening a new window. We have a datagrid that has five hyperlink columns containing...
6
by: T. Seaburn | last post by:
I have an aspx page that is always invoked by Response.Redirect calls from other pages. I want my aspx page to always display in a new browser window. Since the Response.Redirect calls from the...
1
by: et | last post by:
How can I do a Response.Redirect using a target=_blank? Response.Redirect(WebForm2.aspx?cn=12345 Target=_blank) did not work and I'm not sure what else to try.
15
by: dee | last post by:
Hi, I'm curious why MS decided to have Transfer hide the target page's url invisible? Any guesses ? Thanks. Dee.
3
by: Luke Xu | last post by:
In Heyperlink, you can specify the target of URL, such as _blank. But how can I specify the target in Response.Redirect? Thanks Luke
2
by: sck10 | last post by:
Hello, I am trying to redirect to a new URL using a query string and target. I can not figure out how the syntax should be for setting the target. Any help with this would be appreciated. --...
2
by: Steve K | last post by:
I have a form that, when the submit button is clicked, the user is redirected to another webpage using the "next-url" input. But, the page that the form is in is in frames and the page it's being...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.