0

I want to set up a webpage with one small simple string on it. No images, no CSS, not anything else. Just a plain string that is not very long (maximum 20 char).

What is the best way to fetch this string with a C# Form application to use it for a variety of different purposes in the program, like showing people what the newest version of the software is when they boot it up.

2 Answers 2

1

I'd use System.Net.WebClient myself like this:

using (var client = new WebClient())
{
    string result = client.DownloadString("http://www.test.com");
    // TODO: do something with the downloaded result from the remote
}
Sign up to request clarification or add additional context in comments.

Comments

0

Try using System.Net.WebClient:

        string remoteUri = "http://www.myserver.com/mypage.aspx";
        WebClient myWebClient = new WebClient();
        string version = myWebClient.DownloadString(remoteUri);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.