Results 1 to 7 of 7

Thread: [RESOLVED] POST string to webapge

Threaded View

  1. #1

    Thread Starter
    PowerPoster Arc's Avatar
    Join Date
    Sep 2000
    Location
    Under my rock
    Posts
    2,336

    Resolved [RESOLVED] POST string to webapge

    Hey guys I have been trying to find a solution for this and I haven't run across anything helpfull so hopefully you can help me here.

    This is a windows app not an ASP web app, if that matters.

    I am trying to use something like this to POST a string to a webpage on my server. Is this possible from a windows app? I have no idea how to go about it and can't seem to find anything that is helping.

    Code:
     string sql = "INSERT INTO tblWhatever (field1,field2) VALUES ('1','2')";
                HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("");
                myReq.Method = "POST";
                myReq.ContentType = "application/x-www-form-urlencoded";
                StreamWriter writer = new StreamWriter(myReq.GetRequestStream());
                writer.Write(sql);
                writer.Close();
    Alternatively, I have one function that checks to see if an account ID is valid. I would like to send the AccountID to a webapge on my server, have the webpage see if the account is valid then send back a response of "yes or no" to my windows app. Is that possible?

    Thanks for any input you can give me!
    Last edited by Arc; Mar 14th, 2008 at 06:12 PM.
    -We have enough youth. How about a fountain of "Smart"?
    -If you can read this, thank a teacher....and since it's in English, thank a soldier.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width