Click here to Skip to main content
15,913,709 members
Home / Discussions / C#
   

C#

 
AnswerRe: Data Link Dialog Box??? Pin
Rocky Moore14-Jul-02 14:01
Rocky Moore14-Jul-02 14:01 
AnswerRe: Data Link Dialog Box??? Pin
Feng Qin14-Jul-02 19:55
Feng Qin14-Jul-02 19:55 
GeneralRe: Data Link Dialog Box??? Pin
leppie14-Jul-02 23:13
leppie14-Jul-02 23:13 
GeneralRe: Data Link Dialog Box??? Pin
Feng Qin15-Jul-02 16:39
Feng Qin15-Jul-02 16:39 
GeneralRe: Data Link Dialog Box??? Pin
leppie16-Jul-02 0:53
leppie16-Jul-02 0:53 
GeneralRe: Data Link Dialog Box??? Pin
Feng Qin16-Jul-02 0:59
Feng Qin16-Jul-02 0:59 
GeneralOne byte at a time Pin
Nnamdi Onyeyiri14-Jul-02 8:13
Nnamdi Onyeyiri14-Jul-02 8:13 
GeneralRe: One byte at a time Pin
Nathan Blomquist14-Jul-02 9:54
Nathan Blomquist14-Jul-02 9:54 
public static string RetrievePage(string url)
{
// Creates an HttpWebRequest with the specified URL.
HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(url);

// Sends the HttpWebRequest and waits for the response.
HttpWebResponse myHttpWebResponse = (HttpWebResponse)myHttpWebRequest.GetResponse();

// Gets the stream associated with the response.
Stream receiveStream = myHttpWebResponse.GetResponseStream();
Encoding encode = System.Text.Encoding.GetEncoding("utf-8");

// Pipes the stream to a higher level stream reader with the required encoding format.
StreamReader readStream = new StreamReader( receiveStream, encode );

string retString = readStream.ReadToEnd();

myHttpWebResponse.Close();

return retString;
}

This function takes a URL as a string and the retrieves that URL. It shouldn't be difficult to modify this to make it work with binary (in fact I think it should work with no mods, but I can't be sure...).

Later,
Nathan

---------------------------
Hmmm... what's a signature?
GeneralRe: One byte at a time Pin
Nnamdi Onyeyiri15-Jul-02 1:26
Nnamdi Onyeyiri15-Jul-02 1:26 
GeneralRe: One byte at a time Pin
Anonymous20-Jul-02 23:57
Anonymous20-Jul-02 23:57 
Questionprinting Rich Text Format ??? Pin
Patrick Bristow13-Jul-02 6:41
Patrick Bristow13-Jul-02 6:41 
AnswerRe: printing Rich Text Format ??? Pin
ChrisKo16-Jul-02 10:22
ChrisKo16-Jul-02 10:22 
GeneralOne for the SharpDevelop gurus out there. Pin
Jon Newman13-Jul-02 6:02
Jon Newman13-Jul-02 6:02 
QuestionHelp! How do I calculate percentage differences? Pin
AndrewGoodman13-Jul-02 0:56
sussAndrewGoodman13-Jul-02 0:56 
AnswerRe: Help! How do I calculate percentage differences? Pin
leppie13-Jul-02 8:05
leppie13-Jul-02 8:05 
GeneralNAnt Pin
Londo12-Jul-02 22:26
Londo12-Jul-02 22:26 
GeneralRe: NAnt Pin
leppie14-Jul-02 5:45
leppie14-Jul-02 5:45 
GeneralHTML rendering in C# Pin
sultan_of_6string12-Jul-02 20:25
sultan_of_6string12-Jul-02 20:25 
GeneralRe: HTML rendering in C# Pin
Christopher Lord14-Jul-02 10:47
Christopher Lord14-Jul-02 10:47 
QuestionDateTimePicker Localization? Pin
Syed Hussain12-Jul-02 6:05
Syed Hussain12-Jul-02 6:05 
GeneralAutorun... Pin
David Stone12-Jul-02 6:03
sitebuilderDavid Stone12-Jul-02 6:03 
GeneralRe: Autorun... Pin
Nitron12-Jul-02 6:20
Nitron12-Jul-02 6:20 
GeneralRe: Autorun... Pin
David Stone12-Jul-02 7:01
sitebuilderDavid Stone12-Jul-02 7:01 
General[Yet Another Q] making a non-resizable form Pin
Nnamdi Onyeyiri12-Jul-02 2:20
Nnamdi Onyeyiri12-Jul-02 2:20 
GeneralRe: [Yet Another Q] making a non-resizable form Pin
Andreas Philipson12-Jul-02 4:12
Andreas Philipson12-Jul-02 4:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.