Asp.net 如何修复此错误?

Asp.net 如何修复此错误?,asp.net,Asp.net,我犯了错误 plz帮助将json转换为RCPT string json = JsonConvert.SerializeObject(rcpts); 使用系统; 使用System.Collections.Generic; 使用System.IO; 使用System.Linq; Net系统; 使用系统文本; 使用System.Web; 使用System.Web.UI; 使用System.Web.UI.WebControl; 名称空间sdd。联系 { 公共部分类Cantact:System.Web

我犯了错误

plz帮助将json转换为RCPT

string json = JsonConvert.SerializeObject(rcpts);
使用系统;
使用System.Collections.Generic;
使用System.IO;
使用System.Linq;
Net系统;
使用系统文本;
使用System.Web;
使用System.Web.UI;
使用System.Web.UI.WebControl;
名称空间sdd。联系
{
公共部分类Cantact:System.Web.UI.Page
{
受保护的无效页面加载(对象发送方、事件参数e)
{
}
受保护的无效SabtButton_Click(对象发送方,事件参数e)
{
WebRequest=WebRequest.Create(“http://ippanel.com/services.jspd");
字符串[]rcpts=新字符串[]{“981111111”};
字符串json=JsonConvert.SerializeObject(rcpts);
request.Method=“POST”;
string postData=“op=send&uname=aaaa&pass=0000&message=hello Test&to=“+json+”&from=+9810001010”;
byte[]byteArray=Encoding.UTF8.GetBytes(postData);
request.ContentType=“application/x-www-form-urlencoded”;
request.ContentLength=byteArray.Length;
Stream dataStream=request.GetRequestStream();
写入(byteArray,0,byteArray.Length);
dataStream.Close();
WebResponse=request.GetResponse();
Console.WriteLine(((HttpWebResponse)response.StatusDescription);
dataStream=response.GetResponseStream();
StreamReader=新的StreamReader(数据流);
字符串responseFromServer=reader.ReadToEnd();
Console.WriteLine(responseFromServer);
reader.Close();
dataStream.Close();
response.Close();
系统.诊断.调试.写入线(responseFromServer);
}
}

}
您可以尝试
解析
反序列化对象
,以实现以下目的:

JObject json = JObject.Parse(rcpts);


感谢您的回答,但是:反序列化对象:名称“JsonConvert”在当前上下文中不存在,请再次帮助我您需要导入
JsonConvert
。为此,您需要安装
Newtonsoft.Json
“管理NuGet软件包”->搜索“Newtonsoft Json”。->单击“安装”。
dynamic json  = JsonConvert.DeserializeObject(rcpts);