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> On Feb 6, 1:47 pm, Michael Nemtsev <nemt...@msn.com> wrote:
L>
>> Hello Lily,
>>
[quoted text clipped - 13 lines]
>> 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
eng.rana - 06 Feb 2007 15:02 GMT
actually i have a virtaul path and i need to convert it to a physical
path from my windows application, so i was wondering how can i
refrence the local server to convert from the virtual path to the
local one?
is there any other ideas to convert a virtual path to a local path
from a windows application???
thanx
> Hello Lily,
>
[quoted text clipped - 75 lines]
>
> - Show quoted text -
Michael Nemtsev - 06 Feb 2007 15:10 GMT
Hello eng.rana,
It's possibe, use HttpRuntime.CodegenDir
the only problem is that your files are not in the virtual folder - they
are compiled into
\v2.0.50727\Temporary ASP.NET Files\<you_app>\bla-bla\bla-bla and it's changes
time to time
so the best way is to use WebRequest with virtual path
e> actually i have a virtaul path and i need to convert it to a physical
e> path from my windows application, so i was wondering how can i
e> refrence the local server to convert from the virtual path to the
e> local one?
e>
e> is there any other ideas to convert a virtual path to a local path
e> from a windows application???
---
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