-1

I am making a windows form application using c# that will check a url, follow redirection and sees if the redirected url is the one i want.

As a new programmer, I have only handled any network related things in java and my searches of doing the same in c# have been unsuccessful. Could you guys help me out please?

4
  • You want to use 2 completely and opposite programming languages to do something C# could handle by itself? doesn't make much sense to me. Commented Mar 26, 2014 at 1:55
  • no what I mean is I only have experience in java so I was wondering how i could achieve the objective in c# Commented Mar 26, 2014 at 1:56
  • 2
    Start by using the search on this site, there is plenty of questions that show how to get a page and how to check the page content, more specially you want either webclient/webrequest and htmlagilitypack library. Learn how to get the page then how to check the content to see if its what you need. Commented Mar 26, 2014 at 1:57
  • thanks:) I will check those out Commented Mar 26, 2014 at 2:01

1 Answer 1

1

Use:

WebClient wc= new WebClient();
var str = wc.DownloadString("YourURL");

With WebClient you can send request and get response.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.