No open asp page when I post data from Android
Android
1
Posts
1
Posters
3
Views
1
Watching
-
Iam having android code bellow:
after send request to asp page than receiving respond content.
I have a problem : asp page not open and in page load function I get data from request . but it is null.
Somebody help me. get data from asp pageAndroid code
public String SendDataWebForm()
{String line = "", rs = ""; HttpClient client = new DefaultHttpClient(); HttpPost post = new HttpPost("http://tracklocation.somee.com/maps.aspx?id=12321"); try { List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1); nameValuePairs.add(new BasicNameValuePair("imei","123456789")); post.setEntity(new UrlEncodedFormEntity(nameValuePairs)); HttpResponse response = client.execute(post); // BufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent())); rs = response.toString(); } catch (IOException e) { e.printStackTrace(); } return rs; }
ASP code
namespace WebLocationPredicttion
{
public partial class maps : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string text = Page.Request.Form["imei"];} }
}