title: WebRequest to post data in Login page
body: <p>I read questions with similar titles and test codes but my problem is not solved.
  My problem: I need a program in C# that post dates to a modem login page. My modem is wimax bm632. The address of login page is htp://192.168.1.1/ and the action of form that there is 
  in <a href="http://192.168.1.1/" rel="nofollow">http://192.168.1.1/</a> is <a href="http://192.168.1.1/index/login.cgi" rel="nofollow">http://192.168.1.1/index/login.cgi</a> (form action). I want when login is success then go to <a href="http://192.168.1.1/html/wimax/security.asp" rel="nofollow">http://192.168.1.1/html/wimax/security.asp</a> and get page source.
  login page : <a href="http://chamalz.persiangig.com/image/1.JPG" rel="nofollow">http://chamalz.persiangig.com/image/1.JPG</a></p>
  
  <p>I write this code:</p>
  
  <pre><code>WebRequest request = WebRequest.Create("http://192.168.1.1/index/login.cgi");
  
          request.Method = "POST";
  
          string postData = "Username=admin&amp;Password=YWRtaW4%3D";
          byte[] byteArray = Encoding.UTF8.GetBytes (postData);
  
          request.ContentLength = byteArray.Length;
  
          Stream dataStream = request.GetRequestStream ();
  
          dataStream.Write (byteArray, 0, byteArray.Length);
  
          dataStream.Close ();
  
          WebResponse response = request.GetResponse ();
  
          textBox1.Text=(((HttpWebResponse)response).StatusD  escription);
  
          dataStream = response.GetResponseStream ();
  
          StreamReader reader = new StreamReader (dataStream);
  
          string responseFromServer = reader.ReadToEnd ();
  
          textBox1.Text= (responseFromServer);
  
          reader.Close ();
          dataStream.Close ();
          response.Close ();
  </code></pre>
  
  <p>This code has no error but have a problem : when I post my user name and password correct or incorrect I received one response in textBox1.Text
  the response is : <a href="http://chamalz.persiangig.com/image/2.JPG" rel="nofollow">http://chamalz.persiangig.com/image/2.JPG</a></p>
  
  <p>Please help me.</p>