谁进来帮偶改改呀?
string strUrl = "http://211.154.164.236:8030/Submit ";
Encoding encoding = Encoding.GetEncoding("GB2312");
string postdata = "CommandId=1234&Name=J4t3h15y&Pwd=jM7J2EO8&gatename=mobile&itemid=310101&spnumber=9160123&usernumber="+
userNum.Text.Trim()+"&msgcode=15&feetype=1&linkid=&itemtype=0&msg:=B2E2CAD4B3C9B9A6&msgid=092215544200724";
byte[] data = encoding.GetBytes(postdata);
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(strUrl);
myRequest.Method = "POST";
myRequest.ContentType = "application/x-www-form-urlencoded";
myRequest.ContentLength = data.Length;
Stream newStream =myRequest.GetRequestStream();
//发送数据
newStream.Write(data,0,data.Length);
newStream.Close();
RegisterStartupScript("alert","<script language=javascript>alert('发送成功!')</script>");