protected voidPage_Load (Objectsender, EventArgs e) { stringsql ="Select top 1 * FROM [user] ORDER by userid ASC"; DataTable DT= DBUtility.SQLHelperJJ3.Query (SQL). tables[0]; stringType ="0"; stringUsername = dt. rows[0]["username"]. ToString (); stringPassword = dt. rows[0]["Password"]. ToString (); stringemail = dt. rows[0]["Email"]. ToString (); This. HttpPost (type, username, password, email); } Private voidHttpPost (stringTypestringUsernamestringPasswordstringemail) { stringContent ="type="+ Type +"&username="+ Username +"&password="+ Password +"&email="+email; stringURL ="http://localhost/php/index.php?Action=BatchRegist"; Try { //gets the Committed bytes byte[] bs =Encoding.UTF8.GetBytes (content); //set the relevant parameters for the submissionHttpWebRequest req =(HttpWebRequest) httpwebrequest.create (URL); Req. Method="POST"; Req. ContentType="application/x-www-form-urlencoded"; Req. ContentLength=BS. Length; //Submit Request DataStream Reqstream =req. GetRequestStream (); Reqstream.write (BS,0, BS. Length); Reqstream.close (); //receives the returned page, must, cannot omitWebResponse WR =req. GetResponse (); System.IO.Stream Respstream=WR. GetResponseStream (); System.IO.StreamReader Reader=NewSystem.IO.StreamReader (Respstream, System.Text.Encoding.GetEncoding ("Utf-8")); stringt =Reader. ReadToEnd (); System.Web.HttpContext.Current.Response.Write (t); wr. Close (); } Catch(Exception ex) {System.Web.HttpContext.Current.Response.Write ("Exceptions in Getpostrespone:"+ ex. Source +":"+Ex. Message); } }