0

Is there a way to get a Message from a website(like copy it), then have it show up in a textbox? If, so can you provide an example?

4
Contributors
5
Replies
7
Views
6 Years
Discussion Span
Last Post by jakemdrew
0

You can use WebRequest.

Here's an example:

Add reference: "using System.Net;"

WebRequest request = WebRequest.Create("http://www.google.com");
WebResponse response = request.GetResponse();

System.IO.StreamReader reader = new System.IO.StreamReader(response.GetResponseStream());

textBox1.Text = reader.ReadToEnd();

Edited by farooqaaa: n/a

0

Say I wanted to get this text : TEST

How would I get that?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.