title: How to pass login credentials to asp server from android app
body: <p>From researching I have found out, that I can send information to a server using HttpPost so I have.</p>
  
  <pre><code>HttpClient client = new DefaultHttpClient();
  HttpPost post = new HttpPost("https://portal.sibt.nsw.edu.au/Default.asp");
  </code></pre>
  
  <p>I have two EditText fields to hold the userId and password, and a button for login.</p>
  
  <pre><code>EditText id ;
  EditText pword ;
  Button logIn ;
  
  List&lt;NameValuePair&gt; nameValuePair = new ArrayList&lt;NameValuePair&gt;(2);
              nameValuePair.add(new BasicNameValuePair("UserID", id.getText().toString()));
              nameValuePair.add(new BasicNameValuePair("Password", pword.getText().toString()));
  
  post.setEntity(new UrlEncodedFormEntity(nameValuePair));//already inside a try/catch() block
  
  new getResponse().execute()     
  
   // in AsyncTask
   public abstract class getResponse extends AsyncTask&lt;Void, Void, Void&gt;{
  
       public String doInBackground(){
           try {
               HttpResonse response = client.execute(post);
           String responseContent = EntityUtils.toString(response.getEntity());
       Log.d("response to string", responseContent);
           }/...
  </code></pre>
  
  <p>Now in the LogCat I see the html of this "<a href="https://portal.sibt.nsw.edu.au/Default.asp" rel="nofollow">https://portal.sibt.nsw.edu.au/Default.asp</a>", however, when checking the entity with
      System.out.println(post.getEntity());
  i get "org.apache.http.client.entity.UrlEncodedFormEntity@41237c10" however I am not getting the page in response that I am supposed to, which is the page after login, instead i get the HTML of "post". What am I doing wrong.</p>
  
  <p>Note: compiling in 4.1.2</p>