Click here to Skip to main content
15,890,845 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Forums Pin
Brij29-Dec-08 2:10
mentorBrij29-Dec-08 2:10 
GeneralRe: Forums Pin
Jon_Boy30-Dec-08 4:12
Jon_Boy30-Dec-08 4:12 
AnswerRe: Forums Pin
Navneet Hegde30-Dec-08 3:26
Navneet Hegde30-Dec-08 3:26 
Questionasp.net Pin
senthil050528-Dec-08 4:56
senthil050528-Dec-08 4:56 
AnswerRe: asp.net Pin
Mark Salsbery28-Dec-08 5:02
Mark Salsbery28-Dec-08 5:02 
AnswerRe: asp.net Pin
Lev Danielyan28-Dec-08 5:05
Lev Danielyan28-Dec-08 5:05 
AnswerRe: asp.net Pin
Colin Angus Mackay28-Dec-08 8:36
Colin Angus Mackay28-Dec-08 8:36 
Questionstuck with WebRequest Pin
Evgeni5728-Dec-08 3:11
Evgeni5728-Dec-08 3:11 
I'm running the following code:
StringBuilder sb = new StringBuilder();
     byte[] buf = new byte[131072];
     string url = null;
     url = "http://google.com";
     HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
     HttpWebResponse response = (HttpWebResponse)request.GetResponse();
     if (request.HaveResponse)
     {
         Stream resStream = response.GetResponseStream();
         string tempString = null;
         int count = 0;
         do
         {
             count = resStream.Read(buf, 0, buf.Length);
             if (count != 0)
             {
                 tempString = Encoding.ASCII.GetString(buf, 0, count);
                 sb.Append(tempString);
             }
         } while (count > 0);
     }
     richTextBox1.Text = sb.ToString();

and after code executed richTextBox1.Text contains the same code as I can see if I open in browser url and click on "view source".
But not always. There are some urls, that I can see server's replay in browser, and see html code in "view source", but richTextBox1.Text contains junk. May be there is some problem with page encoding or something?
Thanks.
AnswerRe: stuck with WebRequest Pin
Mark Salsbery28-Dec-08 5:18
Mark Salsbery28-Dec-08 5:18 
GeneralRe: stuck with WebRequest Pin
Evgeni5728-Dec-08 7:10
Evgeni5728-Dec-08 7:10 
GeneralRe: stuck with WebRequest Pin
EliottA28-Dec-08 7:20
EliottA28-Dec-08 7:20 
GeneralRe: stuck with WebRequest Pin
Mark Salsbery28-Dec-08 7:24
Mark Salsbery28-Dec-08 7:24 
GeneralRe: stuck with WebRequest Pin
Evgeni5729-Dec-08 3:48
Evgeni5729-Dec-08 3:48 
Question.Net Framework and x64 compatibility Pin
mjmim28-Dec-08 1:14
mjmim28-Dec-08 1:14 
AnswerRe: .Net Framework and x64 compatibility Pin
Lev Danielyan28-Dec-08 2:07
Lev Danielyan28-Dec-08 2:07 
GeneralRe: .Net Framework and x64 compatibility Pin
mjmim28-Dec-08 2:17
mjmim28-Dec-08 2:17 
GeneralRe: .Net Framework and x64 compatibility Pin
Lev Danielyan28-Dec-08 2:21
Lev Danielyan28-Dec-08 2:21 
QuestionHow to Access WMI From Server 2008 to Windows XP Pin
priyapriyam27-Dec-08 0:26
priyapriyam27-Dec-08 0:26 
AnswerRe: How to Access WMI From Server 2008 to Windows XP Pin
Brij27-Dec-08 1:39
mentorBrij27-Dec-08 1:39 
AnswerRe: How to Access WMI From Server 2008 to Windows XP Pin
Dave Kreskowiak27-Dec-08 5:54
mveDave Kreskowiak27-Dec-08 5:54 
Questiondatagridview Pin
kulandaivel_mca200726-Dec-08 22:15
kulandaivel_mca200726-Dec-08 22:15 
AnswerRe: Crosspost Pin
Brij26-Dec-08 23:44
mentorBrij26-Dec-08 23:44 
GeneralRe: Crosspost Pin
kulandaivel_mca200727-Dec-08 0:02
kulandaivel_mca200727-Dec-08 0:02 
AnswerRe: datagridview Pin
Aman Bhullar27-Dec-08 23:00
Aman Bhullar27-Dec-08 23:00 
QuestionWMI "Access is Denied" Pin
priyapriyam26-Dec-08 20:52
priyapriyam26-Dec-08 20:52 

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.