getting data from internet
-
how is it possible to get data (information) from an internet site and show it inside of my own program which is a windows form application. tnx
Most obvious way is to use a WebBrowser Control: MSDN[^] If that doesn't do it, what do you want to do?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."
-
how is it possible to get data (information) from an internet site and show it inside of my own program which is a windows form application. tnx
use Web request object
// prepare the web page we will be asking for
HttpWebRequest request = (HttpWebRequest)
WebRequest.Create("http://www.mayosoftware.com");// execute the request
HttpWebResponse response = (HttpWebResponse)
request.GetResponse();
//will read data via the response stream
Stream resStream = response.GetResponseStream();--Pankaj
-
use Web request object
// prepare the web page we will be asking for
HttpWebRequest request = (HttpWebRequest)
WebRequest.Create("http://www.mayosoftware.com");// execute the request
HttpWebResponse response = (HttpWebResponse)
request.GetResponse();
//will read data via the response stream
Stream resStream = response.GetResponseStream();--Pankaj
If I am understanding the question right he will also need a GetStringInBetween method.
public static string[] GetStringInBetween(string strBegin, string strEnd, string strSource, bool includeBegin, bool includeEnd)
{
string[] result = { "", "" };
int iIndexOfBegin = strSource.IndexOf(strBegin);
if (iIndexOfBegin != -1)
{
if (includeBegin)
{ iIndexOfBegin -= strBegin.Length; }
strSource = strSource.Substring(iIndexOfBegin
+ strBegin.Length);
int iEnd = strSource.IndexOf(strEnd);if (iEnd != -1) { if (includeEnd) { iEnd += strEnd.Length; } result\[0\] = strSource.Substring(0, iEnd); if (iEnd + strEnd.Length < strSource.Length) { result\[1\] = strSource.Substring(iEnd + strEnd.Length); } } } else { result\[1\] = strSource; } return result;
}
It is a very generic method you can find it anywhere on the internet, because why would you reinvent the wheel.
-
how is it possible to get data (information) from an internet site and show it inside of my own program which is a windows form application. tnx
And there are web services which you can use.