I successfully submitted (username / password) and received (true / false) values ββfrom my Android application to the .php page. Now I am trying to replace the php page with an aspx page. I am having problems getting data on the Asp.net page (Android application on the asp.net page), so PLS will help me in this regard on the asp.net page.
My Android code is as follows:
public void postLoginData() { HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://xyz/Default.aspx"); try { List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2); nameValuePairs.add(new BasicNameValuePair("formData1", x)); nameValuePairs.add(new BasicNameValuePair("formData2", y)); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); HttpResponse response = httpclient.execute(httppost); result = inputStreamToString(response.getEntity().getContent()).toString(); } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }
source share