用WebClient.UploadValues 汉字出现乱码请问如何解决?急! 解决给400分
如题:
public static void PostToSmsGateway1(string mobile ,string requestmsg ,string responsemsg,string cmd)
{
bool isSend = true;
try
{
WebClient client = new WebClient();
NameValueCollection parms = new NameValueCollection();
parms.Add("msg",responsemsg);
parms.Add("dstid",mobile);
parms.Add("serviceid",cmd);
byte[] bytes =client.UploadValues("http://localhost/Sms.csv","POST",parms);
}
catch(Exception ex)
{
isSend = false;
}
}