Donate

How To Get Or Retrieve The Response URL From WebRequest Object Using C#

The solution is to get the ResponseUri from the response object.
//domain url: http://www.htcatalogs.com.au  
//response url: http://www.htcatalogs.com.au/2012/dailylistings/  
WebRequest request =   
WebRequest.Create("http://www.rmwilliams.com.au");  
HttpWebResponse resp = HttpWebResponse)request.GetResponse();  
string ur = resp.ResponseUri.ToString();  
Console.Write(ur); 

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

TypeScript Error Or Bug: The term 'tsc' is not recognized as the name of a cmdlet, function, script file, or operable program.

Invalid nested tag div found, expected closing tag input