Hello Lily,
what do u wanna do?!
Get data or just browsing?!
For browsing use webbrowse control
for getting data the codesnippet below
public static string GetHTMLFromURL(string url)
{
if(url.Length == 0)
throw new ArgumentException("Invalid URL","url");
string html = "";
HttpWebRequest request = GenerateGetOrPostRequest(url,"GET",null);
HttpWebResponse response = (HttpWebResponse)request.GetResponse( );
try
{
if(VerifyResponse(response)== ResponseCategories.Success)
{
// get the response stream.
Stream responseStream = response.GetResponseStream( );
// use a stream reader that understands UTF8
StreamReader reader = new StreamReader(responseStream,Encoding.UTF8);
try
{
html = reader.ReadToEnd( );
}
finally
{
// close the reader
reader.Close( );
}
}
}
finally
{
response.Close( );
}
return html;
}
L> i'm not lily
L> i think there was something wrong made by google
L> anyway, can u tell me plz how can i use WebRequres and do i have
L> access to it from a windows application
L>
L>
Hello Lily,
What did u try and where falsed?!
Just make the WebRequres to thehttp://localhostorhttp://<yourPCname>
L> hope everything is fine
L> can anyone tell me how can i connect to the localhost from a
windows
L> application??
L> i need to refrence the server installed locally from a windows
L> application, is it possible and how??
L> i'm using c#, VS 2003 and need to connect to IIS 6.0
---
WBR, Michael Nemtsev [C# MVP]. Blog:
http://spaces.live.com/laflour
team blog:
http://devkids.blogspot.com/
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo
---
WBR, Michael Nemtsev [C# MVP]. Blog:
http://spaces.live.com/laflour
team blog:
http://devkids.blogspot.com/
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo- Hide quoted text -
- Show quoted text -