Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Android
  4. No open asp page when I post data from Android

No open asp page when I post data from Android

Scheduled Pinned Locked Moved Android
helpandroidcomdesignquestion
1 Posts 1 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Ngan Tran
    wrote on last edited by
    #1

    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 page

    Android 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"];

       }
    }
    

    }

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups